-
Notifications
You must be signed in to change notification settings - Fork 16
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
[refactoring] Extract helper method has_specific_arg
#49
Conversation
6b51aae
to
4f4cec5
Compare
|
get_specific_arg
has_specific_arg
has_specific_arg
has_specific_arg
good catch, thanks. Let me reword the commit as well. |
…call argument presence, and simplify all relevant call sites
4f4cec5
to
2635be0
Compare
torchfix/common.py
Outdated
node: cst.Call, arg_name: str, position: Optional[int] = None | ||
) -> bool: | ||
""" | ||
Check if a named argument is present in a call (not positional). |
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.
not positional
What if position
passed?
I guess either delete position
parameter or change the comment?
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.
updated
fix #8,
Extracted helper method
has_specific_arg
that checks for the call argument presence, and simplified all relevant call sites:becomes:
Testing