mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Weaken return type of Path.{glob,rglob} in 3.13 (#13223)
Since https://github.com/python/cpython/pull/117589 (at least), `Path.glob` and `Path.rglob` return an `Iterator` rather than a `Generator`.
This commit is contained in:
+2
-4
@@ -129,12 +129,10 @@ class Path(PurePath):
|
||||
def read_text(self, encoding: str | None = None, errors: str | None = None) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
def glob(
|
||||
self, pattern: str, *, case_sensitive: bool | None = None, recurse_symlinks: bool = False
|
||||
) -> Generator[Self, None, None]: ...
|
||||
def glob(self, pattern: str, *, case_sensitive: bool | None = None, recurse_symlinks: bool = False) -> Iterator[Self]: ...
|
||||
def rglob(
|
||||
self, pattern: str, *, case_sensitive: bool | None = None, recurse_symlinks: bool = False
|
||||
) -> Generator[Self, None, None]: ...
|
||||
) -> Iterator[Self]: ...
|
||||
elif sys.version_info >= (3, 12):
|
||||
def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ...
|
||||
def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ...
|
||||
|
||||
Reference in New Issue
Block a user