8000 Remove redundant lookup funcs in fixup.py by 97littleleaf11 · Pull Request #11253 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Remove redundant lookup funcs in fixup.py #11253

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

Merged
merged 7 commits into from
Oct 8, 2021
Merged
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
Prev Previous commit
Next Next commit
Fix type-check
  • Loading branch information
97littleleaf11 committed Oct 3, 2021
commit 7ee3c4ad4348b39d9cb2916a49bb0e0d0f8df55a
2 changes: 1 addition & 1 deletion mypy/plugins/attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def argument(self, ctx: 'mypy.plugin.ClassDefContext') -> Argument:
if self.converter.name:
# When a converter is set the init_type is overridden by the first argument
# of the converter method.
converter = lookup_fully_qualified(ctx.api.modules, self.converter.name, True)
converter = lookup_fully_qualified(self.converter.name, ctx.api.modules, True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice, it's awkward that this imported a lookup function from mypy.fixup.

if not converter:
# The converter may be a local variable. Check there too.
converter = ctx.api.lookup_qualified(self.converter.name, self.info, True)
Expand Down
0