-
Notifications
You must be signed in to change notification settings - Fork 18
Support @property
+ @abstractmethod
without a Returns: section
#261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ def checkMethodContainsSpecifiedDecorator( | |
and any( | ||
( # noqa: PAR001 | ||
isinstance(_, ast.Name) | ||
and hasattr(node.decorator_list[-1], 'id') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in the new test case, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given my reply below (#261 (comment)), I think we'd need to change this line into: and hasattr(node.decorator_list[0], 'id') |
||
and hasattr(_, 'id') | ||
and _.id == decorator | ||
) | ||
for _ in node.decorator_list | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to replace "its last decorator" with "its outer-most decorator (i.e., on the top)"