File tree 1 file changed +10
-14
lines changed 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -2131,9 +2131,8 @@ def print_block(
2131
2131
self ,
2132
2132
block : Block ,
2133
2133
* ,
2134
+ clinic : Clinic ,
2134
2135
core_includes : bool = False ,
2135
- # needed if core_includes is true
2136
- clinic : Clinic | None = None ,
2137
2136
) -> None :
2138
2137
input = block .input
2139
2138
output = block .output
@@ -2162,18 +2161,15 @@ def print_block(
2162
2161
write ("\n " )
2163
2162
2164
2163
output = ''
2165
- if clinic :
2166
- limited_capi = clinic .limited_capi
2167
- else :
2168
- limited_capi = DEFAULT_LIMITED_CAPI
2169
- if core_includes and not limited_capi :
2170
- output += textwrap .dedent ("""
2171
- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2172
- # include "pycore_gc.h" // PyGC_Head
2173
- # include "pycore_runtime.h" // _Py_ID()
2174
- #endif
2175
-
2176
- """ )
2164
+ if core_includes :
2165
+ if not clinic .limited_capi :
2166
+ output += textwrap .dedent ("""
2167
+ #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2168
+ # include "pycore_gc.h" // PyGC_Head
2169
+ # include "pycore_runtime.h" // _Py_ID()
2170
+ #endif
2171
+
2172
+ """ )
2177
2173
2178
2174
if clinic is not None :
2179
2175
# Emit optional includes
You can’t perform that action at this time.
0 commit comments