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
{{ message }}
Repository navigation
Allow default argument to be passed as keyword to os._Environ #15193
As of #15085, this code is invalid according to the typeshed stubs:
importosos.environ.get("foo", default="bar")
Both mypy and ty now disallows this code despite it being valid at runtime. main.py:3: error: No overload variant of "get" of "Mapping" matches argument types "str", "str" [call-overload]
At the very least I think os._Environ should have an overload to explicitly allow default to be passed as a keyword argument.
Activity