diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2023-05-04 00:11:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 00:11:29 (GMT) |
commit | 9885677b0494e9be3eb8d7d69bebca0e79d8abcc (patch) | |
tree | 2219a058f206c3cf6140def89095268d20d7cb5b | |
parent | e95dd40aff35775efce4c03bec7d82f03711310b (diff) | |
download | cpython-9885677b0494e9be3eb8d7d69bebca0e79d8abcc.zip cpython-9885677b0494e9be3eb8d7d69bebca0e79d8abcc.tar.gz cpython-9885677b0494e9be3eb8d7d69bebca0e79d8abcc.tar.bz2 |
gh-104146: Remove unused 'second_pass_replacements' from clinic.py (#104147)
The code that manipulated 'second_pass_replacements' was removed in 2015
with commit 0759f84 (gh-67688, bpo-23500).
-rwxr-xr-x | Tools/clinic/clinic.py | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index b8b2b75..d3e120c 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2112,8 +2112,6 @@ impl_definition block traceback.format_exc().rstrip()) printer.print_block(block) - second_pass_replacements = {} - # these are destinations not buffers for name, destination in self.destinations.items(): if destination.type == 'suppress': @@ -2155,23 +2153,8 @@ impl_definition block printer_2.print_block(block, core_includes=True) write_file(destination.filename, printer_2.f.getvalue()) continue - text = printer.f.getvalue() - - if second_pass_replacements: - printer_2 = BlockPrinter(self.language) - parser_2 = BlockParser(text, self.language) - changed = False - for block in parser_2: - if block.dsl_name: - for id, replacement in second_pass_replacements.items(): - if id in block.output: - changed = True - block.output = block.output.replace(id, replacement) - printer_2.print_block(block) - if changed: - text = printer_2.f.getvalue() - - return text + + return printer.f.getvalue() def _module_and_class(self, fields): |