Skip to content

Commit 9768f7f

Browse files
gh-104146: Remove unused 'second_pass_replacements' from clinic.py
The code that manipulated 'second_pass_replacements' was removed in 2015 with commit 0759f84 (gh-67688, bpo-23500).
1 parent b9ddf21 commit 9768f7f

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

Tools/clinic/clinic.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,8 +2112,6 @@ def parse(self, input):
21122112
traceback.format_exc().rstrip())
21132113
printer.print_block(block)
21142114

2115-
second_pass_replacements = {}
2116-
21172115
# these are destinations not buffers
21182116
for name, destination in self.destinations.items():
21192117
if destination.type == 'suppress':
@@ -2155,23 +2153,8 @@ def parse(self, input):
21552153
printer_2.print_block(block, core_includes=True)
21562154
write_file(destination.filename, printer_2.f.getvalue())
21572155
continue
2158-
text = printer.f.getvalue()
2159-
2160-
if second_pass_replacements:
2161-
printer_2 = BlockPrinter(self.language)
2162-
parser_2 = BlockParser(text, self.language)
2163-
changed = False
2164-
for block in parser_2:
2165-
if block.dsl_name:
2166-
for id, replacement in second_pass_replacements.items():
2167-
if id in block.output:
2168-
changed = True
2169-
block.output = block.output.replace(id, replacement)
2170-
printer_2.print_block(block)
2171-
if changed:
2172-
text = printer_2.f.getvalue()
2173-
2174-
return text
2156+
2157+
return printer.f.getvalue()
21752158

21762159

21772160
def _module_and_class(self, fields):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy