Skip to content

Commit 6d82a33

Browse files
committed
A few more
1 parent 5abf4f1 commit 6d82a33

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

stdlib/typing_extensions.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ if sys.version_info >= (3, 10):
211211
else:
212212
@final
213213
class ParamSpecArgs:
214-
__origin__: ParamSpec
214+
@property
215+
def __origin__(self) -> ParamSpec: ...
215216
def __init__(self, origin: ParamSpec) -> None: ...
216217

217218
@final
218219
class ParamSpecKwargs:
219-
__origin__: ParamSpec
220+
@property
221+
def __origin__(self) -> ParamSpec: ...
220222
def __init__(self, origin: ParamSpec) -> None: ...
221223

222224
Concatenate: _SpecialForm

tests/stubtest_allowlists/py311.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ contextlib.AbstractAsyncContextManager.__class_getitem__
126126
contextlib.AbstractContextManager.__class_getitem__
127127

128128
# Super-special typing primitives
129-
typing._SpecialForm.__mro_entries__
129+
typing\._SpecialForm.*
130130
typing._TypedDict.__delitem__
131131
typing._TypedDict.__ior__
132132
typing._TypedDict.__or__

tests/stubtest_allowlists/py37.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,6 @@ typing_extensions\.reveal_type
159159

160160
# Doesn't exist at runtime
161161
typing\.Protocol
162+
163+
# Function at runtime; we pretend it's already a class
164+
typing_extensions\.NewType

tests/stubtest_allowlists/py38.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,6 @@ types.WrapperDescriptorType.__get__
174174
typing_extensions\.assert_never
175175
typing_extensions\.assert_type
176176
typing_extensions\.reveal_type
177+
178+
# Function at runtime; we pretend it's already a class
179+
typing_extensions\.NewType

tests/stubtest_allowlists/py39.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,6 @@ types.WrapperDescriptorType.__get__
170170
typing_extensions\.assert_never
171171
typing_extensions\.assert_type
172172
typing_extensions\.reveal_type
173+
174+
# Function at runtime; we pretend it's already a class
175+
typing_extensions\.NewType

tests/stubtest_allowlists/py3_common.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,13 +409,14 @@ tempfile._TemporaryFileWrapper.[\w_]+ # Dynamically specified by __getattr__, a
409409

410410
# Details of runtime definition don't need to be in stubs
411411
typing_extensions\._SpecialForm.*
412-
typing\._SpecialForm.*
413412
typing_extensions\.TypeVar.*
414413
typing_extensions\.TypeVarTuple.*
415414
typing_extensions\.ParamSpec.*
416415
typing\.Generic
416+
typing\.Protocol
417417

418418
# Special primitives
419+
typing_extensions\.Annotated
419420
typing_extensions\.NamedTuple
420421
typing_extensions\.LiteralString
421422
typing_extensions\.Final
@@ -467,7 +468,7 @@ typing_extensions\.TypeAliasType\.__call__
467468
typing_extensions\.TypeAliasType\.__init_subclass__
468469

469470
# We call them read-only properties, runtime implementation is slightly different
470-
typing_extensions\.TypeAliasType\.__(parameters|type_params|name|module)__
471+
typing_extensions\.TypeAliasType\.__(parameters|type_params|name|module|value)__
471472

472473
# https://github.com/python/mypy/issues/15302
473474
typing_extensions\.deprecated

0 commit comments

Comments
 (0)