ast, configparser, glob: Python 3.13 updates (#12050)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Amin Alaee
2024-06-01 16:13:10 +02:00
committed by GitHub
parent 4269f992f1
commit 124d02034d
5 changed files with 156 additions and 66 deletions

View File

@@ -1,10 +1,13 @@
import sys
from _typeshed import StrOrBytesPath
from collections.abc import Iterator
from collections.abc import Iterator, Sequence
from typing import AnyStr
__all__ = ["escape", "glob", "iglob"]
if sys.version_info >= (3, 13):
__all__ += ["translate"]
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
@@ -40,3 +43,8 @@ else:
def escape(pathname: AnyStr) -> AnyStr: ...
def has_magic(s: str | bytes) -> bool: ... # undocumented
if sys.version_info >= (3, 13):
def translate(
pat: str, *, recursive: bool = False, include_hidden: bool = False, seps: Sequence[str] | None = None
) -> str: ...