-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix handling of non-method callable attribute #3227
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
Changes from 1 commit
5800819
a67b78c
a523b1f
78d0887
3c8e85f
42020fb
7aacb4f
6703816
d7a41f9
1c58d49
8c4a8ce
499d596
71faee9
2108a03
a8a0386
bd1f0f3
733fd8e
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 |
---|---|---|
|
@@ -796,6 +796,7 @@ def check_reverse_op_method(self, defn: FuncItem, typ: CallableType, | |
arg_types = list(arg_type.iter_deep()) | ||
else: | ||
return | ||
# We check that each method is fine when dispatched on a proper self argument | ||
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. FYI you can make your local commit history more relevant by using 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. I understand I should put more info in the commit messages, but this comment is needed regardless. Or are you referring to the code below it? 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. Neither. I meant that I would prefer to see a single commit pushed to the PR that included the previous commit plus this one (which just added a comment that you forgot on the previous commit). You can do that locally by using 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. This comment is unclear. Can you improve it? |
||
for arg_type in arg_types: | ||
typ2 = self.expr_checker.analyze_external_member_access( | ||
other_method, arg_type, defn) | ||
|
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.
Use
union_items()
instead ofiter_deep()
.