Add sentinels (PEP 661) to the spec by JelleZijlstra · Pull Request #2277 · python/typing
added 2 commits
This was referenced
sharkdp pushed a commit to astral-sh/ruff that referenced this pull request
## Summary Add support for `typing_extensions.Sentinel` (PEP 661). Support for the other variants (`builtins.sentinel`, `typing_extensions.sentinel`) can be added later as stubs are updated. See PEP 661 and python/typing#2277 ## Test Plan New tests added.
thejchap pushed a commit to thejchap/ruff that referenced this pull request
## Summary Add support for `typing_extensions.Sentinel` (PEP 661). Support for the other variants (`builtins.sentinel`, `typing_extensions.sentinel`) can be added later as stubs are updated. See PEP 661 and python/typing#2277 ## Test Plan New tests added.
hrolfurgylfa added a commit to hrolfurgylfa/pyrefly that referenced this pull request
This seems to be what is being decided in the python typing spec, see the PR description: python/typing#2277 Although some typecheckers, like pyright, still have the old behaviour recommended in the PEP of giving an error when a different name is assigned.
hrolfurgylfa added a commit to hrolfurgylfa/pyrefly that referenced this pull request
This seems to be what is being decided in the python typing spec, see the PR description: python/typing#2277 Although some typecheckers, like pyright, still have the old behaviour recommended in the PEP of giving an error when a different name is assigned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters