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
This would be useful from time to time. The (later) issue #801 suggests a general Not type, so I'm closing this issue as a specialized case of the other issue.
There is a use-case when you might explicitly annotate some types as
NonNullable
, consider this example:So, the stub for this file will be:
It works fine, but the problem is with
Optional[]
type.And there's no way to express
Union[Some[int], Error[str]]
withoutNonNullable
.Here's how it can look like:
Real-life example: https://github.com/dry-python/returns/blob/edb8ae203df518393d9568c25e40e5e8413aaeb9/returns/maybe.pyi#L15-L24
After a conversation with @ilevkivskyi I have searched both
typing
andmypy
repos and I have not found a similar proposal. So, I am opening it.The text was updated successfully, but these errors were encountered: