Closed
Description
While trying to debug something, I ended up adding type annotations for the definitions of an object in both code paths, and got a /home/tabbott/foo.py:10: error: Name 'child_pid' already defined
with this (simplified) code:
if True:
child_pid = os.fork() # type: int
# Do stuff
else:
child_pid = None # type: int
Since the types are the same, it seems like this shouldn't be an error.
This may be a variant of #1153.
Metadata
Metadata
Assignees
Labels
No labels