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
attrs,Nothing is intended to be used as typing.Literal[NOTHING] as denoted in attr._make._Nothing. As of pyright version 1.1.371, this no longer works. As per microsoft/pyright#8820, this is an intentional change, and while it's a little unfortunate, it does make sense.
I think a sensible solution would be to expose attr._make._Nothing (for example by removing the leading underscore and exposing it in the relevant __init__.py files) and changing the intended usage to be something along the lines of
attrs,Nothing
is intended to be used astyping.Literal[NOTHING]
as denoted inattr._make._Nothing
. As of pyright version 1.1.371, this no longer works. As per microsoft/pyright#8820, this is an intentional change, and while it's a little unfortunate, it does make sense.I think a sensible solution would be to expose
attr._make._Nothing
(for example by removing the leading underscore and exposing it in the relevant__init__.py
files) and changing the intended usage to be something along the lines ofthough this would be a somewhat breaking change; maybe it could be re-exported as a type alias instead.
Of course, there may very well be a better alternative that satisfies pyright that I have missed.
The text was updated successfully, but these errors were encountered: