From 8c3e9fae325ca7c01779e211ae816b5b2ae12464 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 2 Aug 2023 10:41:19 +0200 Subject: [PATCH 1/2] gh-104146: Remove dead code from Argument Clinic Remove commented out lines from clinic.py --- Tools/clinic/clinic.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 642fb7e791f059..5f7d41e4415515 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -1098,7 +1098,6 @@ def parser_body( parsearg = p.converter.parse_arg(argname, displayname) if parsearg is None: - #print('Cannot convert %s %r for %s' % (p.converter.__class__.__name__, p.converter.format_unit, p.converter.name), file=sys.stderr) parser_code = None break if has_optional or p.is_optional(): @@ -1191,7 +1190,6 @@ def parser_body( displayname = p.get_displayname(i+1) parsearg = p.converter.parse_arg(argname_fmt % i, displayname) if parsearg is None: - #print('Cannot convert %s %r for %s' % (p.converter.__class__.__name__, p.converter.format_unit, p.converter.name), file=sys.stderr) parser_code = None break if add_label and (i == pos_only or i == max_pos): @@ -4645,13 +4643,11 @@ def next( state: StateKeeper, line: str | None = None ) -> None: - # real_print(self.state.__name__, "->", state.__name__, ", line=", line) self.state = state if line is not None: self.state(line) def state_dsl_start(self, line: str) -> None: - # self.block = self.ClinicOutputBlock(self) if not self.valid_line(line): return From 3e200bbf592beb12acd84c0758f8560a886f7b55 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 2 Aug 2023 10:50:25 +0200 Subject: [PATCH 2/2] Remove unused import from cpp --- Tools/clinic/cpp.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Tools/clinic/cpp.py b/Tools/clinic/cpp.py index fbac81336b545e..5b7fa06494ad53 100644 --- a/Tools/clinic/cpp.py +++ b/Tools/clinic/cpp.py @@ -1,7 +1,6 @@ import dataclasses as dc import re import sys -from collections.abc import Callable from typing import NoReturn