Skip to content

Commit 81070c4

Browse files
authored
posixpath.commonpath supports Iterable parameter (#11310)
1 parent a661dcc commit 81070c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/posixpath.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from _typeshed import AnyOrLiteralStr, BytesPath, FileDescriptorOrPath, StrOrBytesPath, StrPath
3-
from collections.abc import Sequence
3+
from collections.abc import Iterable
44
from genericpath import (
55
commonprefix as commonprefix,
66
exists as exists,
@@ -102,11 +102,11 @@ def normpath(path: PathLike[AnyStr]) -> AnyStr: ...
102102
@overload
103103
def normpath(path: AnyOrLiteralStr) -> AnyOrLiteralStr: ...
104104
@overload
105-
def commonpath(paths: Sequence[LiteralString]) -> LiteralString: ...
105+
def commonpath(paths: Iterable[LiteralString]) -> LiteralString: ...
106106
@overload
107-
def commonpath(paths: Sequence[StrPath]) -> str: ...
107+
def commonpath(paths: Iterable[StrPath]) -> str: ...
108108
@overload
109-
def commonpath(paths: Sequence[BytesPath]) -> bytes: ...
109+
def commonpath(paths: Iterable[BytesPath]) -> bytes: ...
110110

111111
# First parameter is not actually pos-only,
112112
# but must be defined as pos-only in the stub or cross-platform code doesn't type-check,

0 commit comments

Comments
 (0)