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
There was a recent update to the typing spec that codified the meaning of return types for (async) contexts: -> bool/-> Literal[True] now mean the context may suppress exceptions, and any other annotations means exceptions are not suppressed. Notably, if a context does always return False in exit it should still not be -> bool to indicate the exception propagates.
At least one annotation is not correct with this scheme:
There was a recent update to the typing spec that codified the meaning of return types for (async) contexts:
-> bool
/-> Literal[True]
now mean the context may suppress exceptions, and any other annotations means exceptions are not suppressed. Notably, if a context does alwaysreturn False
in exit it should still not be-> bool
to indicate the exception propagates.At least one annotation is not correct with this scheme:
asyncstdlib/asyncstdlib/contextlib.py
Lines 202 to 204 in f9c80dd
The text was updated successfully, but these errors were encountered: