Skip to content
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,8 @@ def docstring_for_c_string(

def output_templates(
self,
f: Function
f: Function,
clinic: Clinic
) -> dict[str, str]:
parameters = list(f.parameters.values())
assert parameters
Expand Down Expand Up @@ -1324,7 +1325,6 @@ def parser_body(
cpp_if = "#if " + conditional
cpp_endif = "#endif /* " + conditional + " */"

assert clinic is not None
if methoddef_define and f.full_name not in clinic.ifndef_symbols:
clinic.ifndef_symbols.add(f.full_name)
methoddef_ifndef = normalize_snippet("""
Expand Down Expand Up @@ -1490,7 +1490,7 @@ def render_function(
parameters = f.render_parameters
converters = [p.converter for p in parameters]

templates = self.output_templates(f)
templates = self.output_templates(f, clinic)

f_self = parameters[0]
selfless = parameters[1:]
Expand Down Expand Up @@ -4614,7 +4614,7 @@ def parse(self, block: Block) -> None:
self.next(self.state_terminal)
self.state(None)

block.output.extend(self.clinic.language.render(clinic, block.signatures))
block.output.extend(self.clinic.language.render(self.clinic, block.signatures))

if self.preserve_output:
if block.output:
Expand Down