Skip to content

Commit ea90b5e

Browse files
committed
pyright workaround
1 parent b7a3342 commit ea90b5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/typing.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,12 @@ Annotated: _SpecialForm
440440
AnyStr = TypeVar("AnyStr", str, bytes) # noqa: Y001
441441

442442
if sys.version_info >= (3, 12):
443-
class Generic:
443+
@type_check_only
444+
class _Generic:
444445
@classmethod
445446
def __class_getitem__(cls, args: TypeVar | ParamSpec | tuple[TypeVar | ParamSpec, ...]) -> _Final: ...
446-
447+
448+
Generic: type[_Generic]
447449
else:
448450
# Dummy case; true definition accessible in typing
449451
Generic: _SpecialForm

0 commit comments

Comments
 (0)