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

+14-1
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)