You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mypy complains about the type of next in the following example where we define a builtin if it doesn't exist:
try:
next # Error: Cannot determine type of next
except NameError:
next = lambda x: x.next()
Mypy could fall back to the builtins module namespace during semantic analysis if it can't determine the type of a module-level name. This way the name would refer to the built-in definition until the first redefinition in the file.
(This is derived from #649, originally reported by @rbtcollins).
The text was updated successfully, but these errors were encountered:
Mypy complains about the type of
next
in the following example where we define a builtin if it doesn't exist:Mypy could fall back to the builtins module namespace during semantic analysis if it can't determine the type of a module-level name. This way the name would refer to the built-in definition until the first redefinition in the file.
(This is derived from #649, originally reported by @rbtcollins).
The text was updated successfully, but these errors were encountered: