-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactored ProtectedMethod pattern #548
Conversation
@rultor merge |
@acheshkov OK, I'll try to merge now. You can check the progress of the merge here |
@Vitaly-Protasov @acheshkov Oops, I failed. You can see the full log here (spent 2min)
|
Once we find a protected method in a class, it's a pattern. | ||
''' | ||
def _check_protected(self, node: ASTNode) -> bool: | ||
if all(type in node.modifiers for type in ['protected']): |
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.
You can simply return result of all
.
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.
It seams like you simply looking if 'protected'
is in modifiers. You may check it directly.
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.
@aravij What do you mean by checking it directly?
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.
something like this
return 'protected' in node.modifiers
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.
got it
@rultor merge |
@acheshkov OK, I'll try to merge now. You can check the progress of the merge here |
@Vitaly-Protasov @acheshkov Oops, I failed. You can see the full log here (spent 2min)
|
@rultor merge |
@acheshkov OK, I'll try to merge now. You can check the progress of the merge here |
@Vitaly-Protasov @acheshkov Oops, I failed. You can see the full log here (spent 2min)
|
@rultor merge |
@acheshkov OK, I'll try to merge now. You can check the progress of the merge here |
@acheshkov Done! FYI, the full log is here (took me 15min) |
Solved in case of #528