|
1 | | -from typing import AnyStr, Iterator, List, Union |
| 1 | +import sys |
| 2 | +from _typeshed import AnyPath |
| 3 | +from typing import AnyStr, Iterator, List, Optional, Union |
2 | 4 |
|
3 | 5 | def glob0(dirname: AnyStr, pattern: AnyStr) -> List[AnyStr]: ... |
4 | 6 | def glob1(dirname: AnyStr, pattern: AnyStr) -> List[AnyStr]: ... |
5 | | -def glob(pathname: AnyStr, *, recursive: bool = ...) -> List[AnyStr]: ... |
6 | | -def iglob(pathname: AnyStr, *, recursive: bool = ...) -> Iterator[AnyStr]: ... |
| 7 | + |
| 8 | +if sys.version_info >= (3, 10): |
| 9 | + def glob( |
| 10 | + pathname: AnyStr, *, root_dir: Optional[AnyPath] = ..., dir_fd: Optional[int] = ..., recursive: bool = ... |
| 11 | + ) -> List[AnyStr]: ... |
| 12 | + def iglob( |
| 13 | + pathname: AnyStr, *, root_dir: Optional[AnyPath] = ..., dir_fd: Optional[int] = ..., recursive: bool = ... |
| 14 | + ) -> Iterator[AnyStr]: ... |
| 15 | + |
| 16 | +else: |
| 17 | + def glob(pathname: AnyStr, *, recursive: bool = ...) -> List[AnyStr]: ... |
| 18 | + def iglob(pathname: AnyStr, *, recursive: bool = ...) -> Iterator[AnyStr]: ... |
| 19 | + |
7 | 20 | def escape(pathname: AnyStr) -> AnyStr: ... |
8 | 21 | def has_magic(s: Union[str, bytes]) -> bool: ... # undocumented |
0 commit comments