Skip to content

Remove the kind argument of checker.lookup #11250

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
Changes from all commits
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
5 changes: 2 additions & 3 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4982,9 +4982,8 @@ def in_checked_function(self) -> bool:
or not self.dynamic_funcs
or not self.dynamic_funcs[-1])

def lookup(self, name: str, kind: int) -> SymbolTableNode:
def lookup(self, name: str) -> SymbolTableNode:
"""Look up a definition from the symbol table with the given name.
TODO remove kind argument
"""
if name in self.globals:
return self.globals[name]
Expand All @@ -4998,7 +4997,7 @@ def lookup(self, name: str, kind: int) -> SymbolTableNode:

def lookup_qualified(self, name: str) -> SymbolTableNode:
if '.' not in name:
return self.lookup(name, GDEF) # FIX kind
return self.lookup(name)
else:
parts = name.split('.')
n = self.modules[parts[0]]
Expand Down