lowercase typing_extensions.sentinel not handled right
Describe the Bug
typing_extensions introduced the lowercase variant of Sentinel as implemented in python 3.15 (related: #4059). Pyrefly currently (1.2.0-dev.2) handles uppercase and lowercase Sentinel differently:
from typing import reveal_type
from typing_extensions import Sentinel, sentinel
Lower = sentinel("Lower")
Upper = Sentinel("Upper")
reveal_type(Lower)
reveal_type(Upper)
Output with pyrefly 1.2.0-dev.2 on CPython 3.14.2:
INFO revealed type: sentinel [reveal-type]
--> test.py:7:12
|
7 | reveal_type(Lower)
| -------
|
INFO revealed type: Upper [reveal-type]
--> test.py:8:12
|
8 | reveal_type(Upper)
| -------
|
INFO 0 errors
Output with pyrefly 1.2.0-dev.2 on CPython 3.15.0b3
INFO revealed type: Lower [reveal-type]
--> test.py:7:12
|
7 | reveal_type(Lower)
| -------
|
INFO revealed type: Upper [reveal-type]
--> test.py:8:12
|
8 | reveal_type(Upper)
| -------
|
INFO 0 errors
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN0AqADrow1ekxbsA%2BjHwMY6OBFxLO3XvwDKihqxhQANHTi79UOqjiMY00%2Bj3oDIkQBlcAdxiU6AXht2Zk5QABRCIO5elOEAlCIAqsTE3n50Og7mYSCJydEgcegilDAAbjCoUNKSMCGR3gXFZRVVzDU59SCGIGTFYFCkhAy0UBQAxHQACqS9-SYYOAR0AMaqkGwArpSoeqqEIuM6MHQAFgwMxHCIAPRXPTB9A7xsV4pXmLhLcFcrohAbWzt0Fc6GBeJYSqhoKhsLBlqs-pttip0HRcMRAXA9ugyAxjqoALRlSjKVSpcIAZkIAEYAEzhEQAbW81GJAF0ROt0FweHwYJh8ZgIMUlnoyqkAOR-dC8GDikTShj44oAR3WQr5%2BIA1jBSPjUEslvBrP5xR5UJR0HL0CAAL5dfWimAAMWgMAoaCweCIZFtQA
(Only applicable for extension issues) IDE Information
No response
Probably just need to add it to special exports, I'll mark this as a "good first issue"
I'd like to give this a shot if it's unassigned.
Hey @MannXo it is currently unassigned, but if you want to claim an unassigned issue in the future, feel free to use #claim without the quotes so it will be assigned to you. Feel free to try it out and assign yourself.
@NathanTempest you've claimed this issue — it's now assigned to you. Thanks for picking it up! 🎉
@MannXo if you're not interested then I can pick this up
#claim
@MannXo you've claimed this issue — it's now assigned to you. Thanks for picking it up! 🎉