mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Added __class_getitem__ (#4695)
Resolves #4682 Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -6,6 +6,9 @@ from types import TracebackType
|
||||
from typing import IO, Any, BinaryIO, Generator, List, Optional, Sequence, Text, TextIO, Tuple, Type, TypeVar, Union, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
_P = TypeVar("_P", bound=PurePath)
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
@@ -52,6 +55,8 @@ class PurePath(_PurePathBase):
|
||||
def parents(self: _P) -> Sequence[_P]: ...
|
||||
@property
|
||||
def parent(self: _P) -> _P: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, type: Any) -> GenericAlias: ...
|
||||
|
||||
class PurePosixPath(PurePath): ...
|
||||
class PureWindowsPath(PurePath): ...
|
||||
|
||||
Reference in New Issue
Block a user