Skip to content

Commit c42ae89

Browse files
pre-commit-ci[bot]aminalaee
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent e932a07 commit c42ae89

File tree

3 files changed

+108
-53
lines changed

3 files changed

+108
-53
lines changed

stdlib/_ast.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ from typing_extensions import Unpack
66
PyCF_ONLY_AST: Literal[1024]
77
PyCF_TYPE_COMMENTS: Literal[4096]
88
PyCF_ALLOW_TOP_LEVEL_AWAIT: Literal[8192]
9-
PyCF_OPTIMIZED_AST: Literal[33792]
9+
10+
if sys.version_info >= (3, 13):
11+
PyCF_OPTIMIZED_AST: Literal[33792]
1012

1113
# Used for node end positions in constructor keyword arguments
1214
_EndPositionT = typing_extensions.TypeVar("_EndPositionT", int, int | None, default=int | None) # noqa: Y023

stdlib/configparser.pyi

Lines changed: 102 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -111,57 +111,107 @@ class RawConfigParser(_Parser):
111111

112112
BOOLEAN_STATES: ClassVar[Mapping[str, bool]] # undocumented
113113
default_section: str
114-
@overload
115-
def __init__(
116-
self,
117-
defaults: Mapping[str, str | None] | None = None,
118-
dict_type: type[Mapping[str, str]] = ...,
119-
*,
120-
allow_no_value: Literal[True],
121-
delimiters: Sequence[str] = ("=", ":"),
122-
comment_prefixes: Sequence[str] = ("#", ";"),
123-
inline_comment_prefixes: Sequence[str] | None = None,
124-
strict: bool = True,
125-
empty_lines_in_values: bool = True,
126-
default_section: str = "DEFAULT",
127-
interpolation: Interpolation | None = ...,
128-
converters: _ConvertersMap = ...,
129-
allow_unnamed_section: bool = False,
130-
) -> None: ...
131-
@overload
132-
def __init__(
133-
self,
134-
defaults: Mapping[str, str | None] | None,
135-
dict_type: type[Mapping[str, str]],
136-
allow_no_value: Literal[True],
137-
*,
138-
delimiters: Sequence[str] = ("=", ":"),
139-
comment_prefixes: Sequence[str] = ("#", ";"),
140-
inline_comment_prefixes: Sequence[str] | None = None,
141-
strict: bool = True,
142-
empty_lines_in_values: bool = True,
143-
default_section: str = "DEFAULT",
144-
interpolation: Interpolation | None = ...,
145-
converters: _ConvertersMap = ...,
146-
allow_unnamed_section: bool = False,
147-
) -> None: ...
148-
@overload
149-
def __init__(
150-
self,
151-
defaults: _Section | None = None,
152-
dict_type: type[Mapping[str, str]] = ...,
153-
allow_no_value: bool = False,
154-
*,
155-
delimiters: Sequence[str] = ("=", ":"),
156-
comment_prefixes: Sequence[str] = ("#", ";"),
157-
inline_comment_prefixes: Sequence[str] | None = None,
158-
strict: bool = True,
159-
empty_lines_in_values: bool = True,
160-
default_section: str = "DEFAULT",
161-
interpolation: Interpolation | None = ...,
162-
converters: _ConvertersMap = ...,
163-
allow_unnamed_section: bool = False,
164-
) -> None: ...
114+
if sys.version_info >= (3, 13):
115+
@overload
116+
def __init__(
117+
self,
118+
defaults: Mapping[str, str | None] | None = None,
119+
dict_type: type[Mapping[str, str]] = ...,
120+
*,
121+
allow_no_value: Literal[True],
122+
delimiters: Sequence[str] = ("=", ":"),
123+
comment_prefixes: Sequence[str] = ("#", ";"),
124+
inline_comment_prefixes: Sequence[str] | None = None,
125+
strict: bool = True,
126+
empty_lines_in_values: bool = True,
127+
default_section: str = "DEFAULT",
128+
interpolation: Interpolation | None = ...,
129+
converters: _ConvertersMap = ...,
130+
allow_unnamed_section: bool = False,
131+
) -> None: ...
132+
@overload
133+
def __init__(
134+
self,
135+
defaults: Mapping[str, str | None] | None,
136+
dict_type: type[Mapping[str, str]],
137+
allow_no_value: Literal[True],
138+
*,
139+
delimiters: Sequence[str] = ("=", ":"),
140+
comment_prefixes: Sequence[str] = ("#", ";"),
141+
inline_comment_prefixes: Sequence[str] | None = None,
142+
strict: bool = True,
143+
empty_lines_in_values: bool = True,
144+
default_section: str = "DEFAULT",
145+
interpolation: Interpolation | None = ...,
146+
converters: _ConvertersMap = ...,
147+
allow_unnamed_section: bool = False,
148+
) -> None: ...
149+
@overload
150+
def __init__(
151+
self,
152+
defaults: _Section | None = None,
153+
dict_type: type[Mapping[str, str]] = ...,
154+
allow_no_value: bool = False,
155+
*,
156+
delimiters: Sequence[str] = ("=", ":"),
157+
comment_prefixes: Sequence[str] = ("#", ";"),
158+
inline_comment_prefixes: Sequence[str] | None = None,
159+
strict: bool = True,
160+
empty_lines_in_values: bool = True,
161+
default_section: str = "DEFAULT",
162+
interpolation: Interpolation | None = ...,
163+
converters: _ConvertersMap = ...,
164+
allow_unnamed_section: bool = False,
165+
) -> None: ...
166+
else:
167+
@overload
168+
def __init__(
169+
self,
170+
defaults: Mapping[str, str | None] | None = None,
171+
dict_type: type[Mapping[str, str]] = ...,
172+
*,
173+
allow_no_value: Literal[True],
174+
delimiters: Sequence[str] = ("=", ":"),
175+
comment_prefixes: Sequence[str] = ("#", ";"),
176+
inline_comment_prefixes: Sequence[str] | None = None,
177+
strict: bool = True,
178+
empty_lines_in_values: bool = True,
179+
default_section: str = "DEFAULT",
180+
interpolation: Interpolation | None = ...,
181+
converters: _ConvertersMap = ...,
182+
) -> None: ...
183+
@overload
184+
def __init__(
185+
self,
186+
defaults: Mapping[str, str | None] | None,
187+
dict_type: type[Mapping[str, str]],
188+
allow_no_value: Literal[True],
189+
*,
190+
delimiters: Sequence[str] = ("=", ":"),
191+
comment_prefixes: Sequence[str] = ("#", ";"),
192+
inline_comment_prefixes: Sequence[str] | None = None,
193+
strict: bool = True,
194+
empty_lines_in_values: bool = True,
195+
default_section: str = "DEFAULT",
196+
interpolation: Interpolation | None = ...,
197+
converters: _ConvertersMap = ...,
198+
) -> None: ...
199+
@overload
200+
def __init__(
201+
self,
202+
defaults: _Section | None = None,
203+
dict_type: type[Mapping[str, str]] = ...,
204+
allow_no_value: bool = False,
205+
*,
206+
delimiters: Sequence[str] = ("=", ":"),
207+
comment_prefixes: Sequence[str] = ("#", ";"),
208+
inline_comment_prefixes: Sequence[str] | None = None,
209+
strict: bool = True,
210+
empty_lines_in_values: bool = True,
211+
default_section: str = "DEFAULT",
212+
interpolation: Interpolation | None = ...,
213+
converters: _ConvertersMap = ...,
214+
) -> None: ...
165215
def __len__(self) -> int: ...
166216
def __getitem__(self, key: str) -> SectionProxy: ...
167217
def __setitem__(self, key: str, value: _Section) -> None: ...
@@ -346,6 +396,7 @@ class MissingSectionHeaderError(ParsingError):
346396
if sys.version_info >= (3, 13):
347397
class _UNNAMED_SECTION: ...
348398
UNNAMED_SECTION: _UNNAMED_SECTION
399+
349400
class MultilineContinuationError(ParsingError):
350401
lineno: int
351402
line: str

stdlib/glob.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ def escape(pathname: AnyStr) -> AnyStr: ...
4545
def has_magic(s: str | bytes) -> bool: ... # undocumented
4646

4747
if sys.version_info >= (3, 13):
48-
def translate(pat: AnyStr, *, recursive: bool = False, include_hidden: bool = False, seps: Sequence[str] | None = None) -> AnyStr: ...
48+
def translate(
49+
pat: AnyStr, *, recursive: bool = False, include_hidden: bool = False, seps: Sequence[str] | None = None
50+
) -> AnyStr: ...

0 commit comments

Comments
 (0)