Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-104146: Argument clinic: remove dead code highlighted by the vulture tool #107632

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,6 @@ class Block:
signatures: list[Module | Class | Function] = dc.field(default_factory=list)
output: Any = None # TODO: Very dynamic; probably untypeable in its current form?
indent: str = ''
preindent: str = ''
erlend-aasland marked this conversation as resolved.
Show resolved Hide resolved

def __repr__(self) -> str:
dsl_name = self.dsl_name or "text"
Expand Down Expand Up @@ -2049,12 +2048,8 @@ def dump(self) -> str:
return self.buffers.dump()


# maps strings to Language objects.
# "languages" maps the name of the language ("C", "Python").
# "extensions" maps the file extension ("c", "py").
# "extensions" maps the file extension ("c", "py") to Language classes.
LangDict = dict[str, Callable[[str], Language]]

languages = { 'C': CLanguage, 'Python': PythonLanguage }
extensions: LangDict = { name: CLanguage for name in "c cc cpp cxx h hh hpp hxx".split() }
extensions['py'] = PythonLanguage

Expand Down Expand Up @@ -4427,7 +4422,6 @@ class DSLParser:
positional_only: bool
group: int
parameter_state: ParamState
seen_positional_with_default: bool
indent: IndentStack
kind: FunctionKind
coexist: bool
Expand Down Expand Up @@ -4458,7 +4452,6 @@ def reset(self) -> None:
self.positional_only = False
self.group = 0
self.parameter_state: ParamState = ParamState.START
self.seen_positional_with_default = False
self.indent = IndentStack()
self.kind = CALLABLE
self.coexist = False
Expand Down
Loading