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
Is your feature request related to a problem? Please describe.
Pyre seems to lack understanding of the exit()-keyword. If I try to initialize a variable v and exit the program if the initialization fails, I do not want pyrex to complain that v "is undefined, or not always defined." (Uninitialized local [61])
Describe the solution you'd like
Pyre should not warn about "Uninitialized local [61]" if the program exits in case the variable is not initialized.
Describe alternatives you've considered
-
Additional context
Examples where I would like pyre to not warn about "Uninitialized local [61]" with regards to "v":
try:
v=initV()
exceptInitErrorase:
print("Could not initialize v", e, file=sys.stderr)
exit(ERRORCODE)
returnv
ifx_is_right_for_v(x):
v=xelse:
print(f"{x=} does not work for v")
exit(ERRORCODE)
do_useful_stuff(v)
I recon that this type of pattern can be common when initializing the Python-application and something goes critically wrong, but I am still inexperienced, so this may be a bad pattern alltogether.
The text was updated successfully, but these errors were encountered:
Pyre Feature Request
Is your feature request related to a problem? Please describe.
Pyre seems to lack understanding of the exit()-keyword. If I try to initialize a variable v and exit the program if the initialization fails, I do not want pyrex to complain that v "is undefined, or not always defined." (Uninitialized local [61])
Describe the solution you'd like
Pyre should not warn about "Uninitialized local [61]" if the program exits in case the variable is not initialized.
Describe alternatives you've considered
-
Additional context
Examples where I would like pyre to not warn about "Uninitialized local [61]" with regards to "v":
I recon that this type of pattern can be common when initializing the Python-application and something goes critically wrong, but I am still inexperienced, so this may be a bad pattern alltogether.
The text was updated successfully, but these errors were encountered: