-
Notifications
You must be signed in to change notification settings - Fork 281
Closed
Labels
scoping-control-flowissues related to scoping and control flowissues related to scoping and control flow
Description
Describe the Bug
When running the code below I get
ERROR `node` may be uninitialized [unbound-name]
Pyright handles it fine
from typing import NoReturn
def foo() -> NoReturn:
raise ValueError('')
def main(resolve: bool) -> None:
try:
node = 1
except Exception as exc:
foo()
if resolve:
try:
node = 2
except Exception:
foo()
print(node)Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scoping-control-flowissues related to scoping and control flowissues related to scoping and control flow