| 1 |
import sys |
| 2 |
from _typeshed import StrOrBytesPath |
| 3 |
from collections.abc import Iterator, Sequence |
| 4 |
from typing import AnyStr |
| 5 |
from typing_extensions import deprecated |
| 6 |
|
| 7 |
__all__ = ["escape", "glob", "iglob"] |
| 8 |
|
| 9 |
if sys.version_info >= (3, 13): |
| 10 |
__all__ += ["translate"] |
| 11 |
|
| 12 |
if sys.version_info >= (3, 10): |
| 13 |
@deprecated( |
| 14 |
"Deprecated since Python 3.10; will be removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead." |
| 15 |
) |
| 16 |
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ... |
| 17 |
@deprecated( |
| 18 |
"Deprecated since Python 3.10; will be removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead." |
| 19 |
) |
| 20 |
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ... |
| 21 |
|
| 22 |
else: |
| 23 |
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ... |
| 24 |
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ... |
| 25 |
|
| 26 |
if sys.version_info >= (3, 11): |
| 27 |
def glob( |
| 28 |
pathname: AnyStr, |
| 29 |
*, |
| 30 |
root_dir: StrOrBytesPath | None = None, |
| 31 |
dir_fd: int | None = None, |
| 32 |
recursive: bool = False, |
| 33 |
include_hidden: bool = False, |
| 34 |
) -> list[AnyStr]: ... |
| 35 |
def iglob( |
| 36 |
pathname: AnyStr, |
| 37 |
*, |
| 38 |
root_dir: StrOrBytesPath | None = None, |
| 39 |
dir_fd: int | None = None, |
| 40 |
recursive: bool = False, |
| 41 |
include_hidden: bool = False, |
| 42 |
) -> Iterator[AnyStr]: ... |
| 43 |
|
| 44 |
elif sys.version_info >= (3, 10): |
| 45 |
def glob( |
| 46 |
pathname: AnyStr, *, root_dir: StrOrBytesPath | None = None, dir_fd: int | None = None, recursive: bool = False |
| 47 |
) -> list[AnyStr]: ... |
| 48 |
def iglob( |
| 49 |
pathname: AnyStr, *, root_dir: StrOrBytesPath | None = None, dir_fd: int | None = None, recursive: bool = False |
| 50 |
) -> Iterator[AnyStr]: ... |
| 51 |
|
| 52 |
else: |
| 53 |
def glob(pathname: AnyStr, *, recursive: bool = False) -> list[AnyStr]: ... |
| 54 |
def iglob(pathname: AnyStr, *, recursive: bool = False) -> Iterator[AnyStr]: ... |
| 55 |
|
| 56 |
def escape(pathname: AnyStr) -> AnyStr: ... |
| 57 |
def has_magic(s: str | bytes) -> bool: ... |
| 58 |
|
| 59 |
if sys.version_info >= (3, 13): |
| 60 |
def translate( |
| 61 |
pat: str, *, recursive: bool = False, include_hidden: bool = False, seps: Sequence[str] | None = None |
| 62 |
) -> str: ... |