Skip to content

Commit 18fedd0

Browse files
gh-104050: Annotate Argument Clinic DSLParser attributes (#106357)
1 parent 35963da commit 18fedd0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Tools/clinic/clinic.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4293,6 +4293,19 @@ def dedent(self, line):
42934293
StateKeeper = Callable[[str | None], None]
42944294

42954295
class DSLParser:
4296+
function: Function | None
4297+
state: StateKeeper
4298+
keyword_only: bool
4299+
positional_only: bool
4300+
group: int
4301+
parameter_state: int
4302+
seen_positional_with_default: bool
4303+
indent: IndentStack
4304+
kind: str
4305+
coexist: bool
4306+
parameter_continuation: str
4307+
preserve_output: bool
4308+
42964309
def __init__(self, clinic: Clinic) -> None:
42974310
self.clinic = clinic
42984311

@@ -4312,7 +4325,7 @@ def __init__(self, clinic: Clinic) -> None:
43124325

43134326
def reset(self) -> None:
43144327
self.function = None
4315-
self.state: StateKeeper = self.state_dsl_start
4328+
self.state = self.state_dsl_start
43164329
self.parameter_indent = None
43174330
self.keyword_only = False
43184331
self.positional_only = False

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy