Skip to content

Commit f424cc2

Browse files
committed
Test clinic above
1 parent bf9466a commit f424cc2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Tools/clinic/clinic.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,7 +2147,7 @@ def print_block(
21472147
write("\n")
21482148

21492149
output = ''
2150-
if core_includes and clinic:
2150+
if core_includes:
21512151
output += textwrap.dedent("""
21522152
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
21532153
# include "pycore_gc.h" // PyGC_Head
@@ -2156,11 +2156,12 @@ def print_block(
21562156
21572157
""")
21582158

2159-
# Emit optional includes
2160-
for include, reason in sorted(clinic.includes.items()):
2161-
line = f'#include "{include}"'
2162-
line = line.ljust(35) + f'// {reason}\n'
2163-
output += line
2159+
if clinic:
2160+
# Emit optional includes
2161+
for include, reason in sorted(clinic.includes.items()):
2162+
line = f'#include "{include}"'
2163+
line = line.ljust(35) + f'// {reason}\n'
2164+
output += line
21642165

21652166
input = ''.join(block.input)
21662167
output += ''.join(block.output)

0 commit comments

Comments
 (0)