-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
needs discussionpriority-0-highsemantic-analyzerProblems that happen during semantic analysisProblems that happen during semantic analysistopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctlytopic-variable-scope
Description
With the old semantic analyzer this code is an error:
def func() -> None:
x
x = 1We should also flag it as an error in the new semantic analyzer (ideally also at module scope but it doesn't work currently and there is a separate issue).
This is a follow-up for #6280
Metadata
Metadata
Assignees
Labels
needs discussionpriority-0-highsemantic-analyzerProblems that happen during semantic analysisProblems that happen during semantic analysistopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctlytopic-variable-scope