mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-26 10:40:33 +08:00
Remove redundant version_info branches (#14434)
This commit is contained in:
@@ -10,13 +10,8 @@ if sys.version_info >= (3, 11):
|
||||
def open_resource(self, resource: str) -> IO[bytes]: ...
|
||||
@abstractmethod
|
||||
def resource_path(self, resource: str) -> str: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
@abstractmethod
|
||||
def is_resource(self, path: str) -> bool: ...
|
||||
else:
|
||||
@abstractmethod
|
||||
def is_resource(self, name: str) -> bool: ...
|
||||
|
||||
@abstractmethod
|
||||
def is_resource(self, path: str) -> bool: ...
|
||||
@abstractmethod
|
||||
def contents(self) -> Iterator[str]: ...
|
||||
|
||||
@@ -28,12 +23,8 @@ if sys.version_info >= (3, 11):
|
||||
def is_file(self) -> bool: ...
|
||||
@abstractmethod
|
||||
def iterdir(self) -> Iterator[Traversable]: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
@abstractmethod
|
||||
def joinpath(self, *descendants: str) -> Traversable: ...
|
||||
else:
|
||||
@abstractmethod
|
||||
def joinpath(self, child: str, /) -> Traversable: ...
|
||||
@abstractmethod
|
||||
def joinpath(self, *descendants: str) -> Traversable: ...
|
||||
|
||||
# The documentation and runtime protocol allows *args, **kwargs arguments,
|
||||
# but this would mean that all implementers would have to support them,
|
||||
@@ -47,12 +38,7 @@ if sys.version_info >= (3, 11):
|
||||
@property
|
||||
@abstractmethod
|
||||
def name(self) -> str: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
def __truediv__(self, child: str, /) -> Traversable: ...
|
||||
else:
|
||||
@abstractmethod
|
||||
def __truediv__(self, child: str, /) -> Traversable: ...
|
||||
|
||||
def __truediv__(self, child: str, /) -> Traversable: ...
|
||||
@abstractmethod
|
||||
def read_bytes(self) -> bytes: ...
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user