Skip to content

Commit ae1b471

Browse files
authored
Remove redundant version_info branches (#14434)
1 parent 7c7f8cd commit ae1b471

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

stdlib/importlib/resources/abc.pyi

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ if sys.version_info >= (3, 11):
1010
def open_resource(self, resource: str) -> IO[bytes]: ...
1111
@abstractmethod
1212
def resource_path(self, resource: str) -> str: ...
13-
if sys.version_info >= (3, 10):
14-
@abstractmethod
15-
def is_resource(self, path: str) -> bool: ...
16-
else:
17-
@abstractmethod
18-
def is_resource(self, name: str) -> bool: ...
19-
13+
@abstractmethod
14+
def is_resource(self, path: str) -> bool: ...
2015
@abstractmethod
2116
def contents(self) -> Iterator[str]: ...
2217

@@ -28,12 +23,8 @@ if sys.version_info >= (3, 11):
2823
def is_file(self) -> bool: ...
2924
@abstractmethod
3025
def iterdir(self) -> Iterator[Traversable]: ...
31-
if sys.version_info >= (3, 11):
32-
@abstractmethod
33-
def joinpath(self, *descendants: str) -> Traversable: ...
34-
else:
35-
@abstractmethod
36-
def joinpath(self, child: str, /) -> Traversable: ...
26+
@abstractmethod
27+
def joinpath(self, *descendants: str) -> Traversable: ...
3728

3829
# The documentation and runtime protocol allows *args, **kwargs arguments,
3930
# but this would mean that all implementers would have to support them,
@@ -47,12 +38,7 @@ if sys.version_info >= (3, 11):
4738
@property
4839
@abstractmethod
4940
def name(self) -> str: ...
50-
if sys.version_info >= (3, 10):
51-
def __truediv__(self, child: str, /) -> Traversable: ...
52-
else:
53-
@abstractmethod
54-
def __truediv__(self, child: str, /) -> Traversable: ...
55-
41+
def __truediv__(self, child: str, /) -> Traversable: ...
5642
@abstractmethod
5743
def read_bytes(self) -> bytes: ...
5844
@abstractmethod

0 commit comments

Comments
 (0)