Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ def check_reverse_op_method(self, defn: FuncItem, typ: CallableType,
arg_types = list(arg_type.iter_deep())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use union_items() instead of iter_deep().

else:
return
# We check that each method is fine when dispatched on a proper self argument
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI you can make your local commit history more relevant by using git commit --amend for such things (since you did not push to GitHub in between).

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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?

Copy link
Member

@gvanrossum gvanrossum Apr 24, 2017

Choose a reason for hiding this comment

The 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 git commit --amend for the second commit (that adds the comment). You could also do this after the fact using git rebase -i.

Copy link
Collaborator

Choose a reason for hiding this comment

The 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)
Expand Down