-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: new ast-based helpers + fix has_args, has_decorators #203
Conversation
python/py_helpers.py
Outdated
@@ -424,6 +436,20 @@ def _find_conditions(tree): | |||
|
|||
return [Node(test) for test in _find_conditions(self.tree)] | |||
|
|||
# Returs a Boolean indicating if node1 comes before node2 | |||
def is_ordered(self, node1, node2): |
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.
Please, help me find a better name for this.
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.
The name is fine as it is serving the intended purpose 👍️
Currently the TypeError: Node.is_ordered() takes 3 positional arguments but 5 were given |
The method is also working perfect for non-consecutive statements. This could be mentioned in docs. |
The updated changes are working now for a variable number of arguments in |
Checklist:
Update index.md
)Closes #XXXXX