mirror of https://github.com/python/cpython
gh-104050: Annotate Argument Clinic DSLParser attributes (#106357)
This commit is contained in:
parent
35963da40f
commit
18fedd04a7
|
@ -4293,6 +4293,19 @@ class IndentStack:
|
|||
StateKeeper = Callable[[str | None], None]
|
||||
|
||||
class DSLParser:
|
||||
function: Function | None
|
||||
state: StateKeeper
|
||||
keyword_only: bool
|
||||
positional_only: bool
|
||||
group: int
|
||||
parameter_state: int
|
||||
seen_positional_with_default: bool
|
||||
indent: IndentStack
|
||||
kind: str
|
||||
coexist: bool
|
||||
parameter_continuation: str
|
||||
preserve_output: bool
|
||||
|
||||
def __init__(self, clinic: Clinic) -> None:
|
||||
self.clinic = clinic
|
||||
|
||||
|
@ -4312,7 +4325,7 @@ class DSLParser:
|
|||
|
||||
def reset(self) -> None:
|
||||
self.function = None
|
||||
self.state: StateKeeper = self.state_dsl_start
|
||||
self.state = self.state_dsl_start
|
||||
self.parameter_indent = None
|
||||
self.keyword_only = False
|
||||
self.positional_only = False
|
||||
|
|
Loading…
Reference in New Issue