Skip to content

use LiteralString for Sentinel name - #783

Closed
DetachHead wants to merge 1 commit into
python:mainfrom
DetachHead:patch-2
Closed

use LiteralString for Sentinel name#783
DetachHead wants to merge 1 commit into
python:mainfrom
DetachHead:patch-2

Conversation

@DetachHead

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.53%. Comparing base (83400e9) to head (219ed4f).

❗ There is a different number of reports uploaded between BASE (83400e9) and HEAD (219ed4f). Click for more details.

HEAD has 13 uploads less than BASE
Flag BASE (83400e9) HEAD (219ed4f)
3.11 1 0
3.12 1 0
3.10 1 0
3.13 1 0
pypy3.10 1 0
3.9.12 1 0
3.13.0 1 0
3.9 1 0
3.10.4 1 0
pypy3.11 1 0
3.11.0 1 0
3.12.0 1 0
pypy3.9 1 0
@@             Coverage Diff             @@
##             main     #783       +/-   ##
===========================================
- Coverage   97.26%   79.53%   -17.73%     
===========================================
  Files           3        3               
  Lines        7860     7652      -208     
===========================================
- Hits         7645     6086     -1559     
- Misses        215     1566     +1351     
Flag Coverage Δ
3.10 ?
3.10.4 ?
3.11 ?
3.11.0 ?
3.12 ?
3.12.0 ?
3.13 ?
3.13.0 ?
3.14 79.53% <ø> (ø)
3.9 ?
3.9.12 ?
pypy3.10 ?
pypy3.11 ?
pypy3.9 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/typing_extensions.py 30.94% <ø> (-63.06%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexWaygood

AlexWaygood commented Jul 27, 2026

Copy link
Copy Markdown
Member

You have a NameError because you're trying to use LiteralString before it's defined in this file. But honestly I'd just remove the annotation here. We don't run a type checker in CI (this library defines the runtime shims for defining the type system, it would be very hard), and type checkers and typeshed just ignore any type hints that do appear here. Having anything except the most basic, uncontroversial type hints here is confusing because it implies that they're either checked in CI or useful to end users

@DetachHead

Copy link
Copy Markdown
Contributor Author

oops, i couldn't find typing_extensions.pyi in the typeshed repo so i assumed the types were defined here, but i guess that was the fault of github's abysmal search. i'll just close this then

@DetachHead DetachHead closed this Jul 27, 2026
@AlexWaygood

Copy link
Copy Markdown
Member

It's (somewhat confusingly) in the stdlib directory in typeshed, because if we pretend it's part of the stdlib type checkers let us use symbols defined there in builtins.pyi (otherwise we'd have to wait until they're defined in the typing module on all supported Python versions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants