FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104050: Annotate Argument Clinic DSLParser attributes by erlend-aasland · Pull Request #106357 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 14 additions & 1 deletion Tools/clinic/clinic.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4293,6 +4293,19 @@ def dedent(self, line):
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

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

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
Expand Down

Back | FazBrowse Home | New Git URL