@@ -202,7 +202,7 @@ def subpython_err(command, **kwds):
202
202
"""
203
203
argv = [sys.executable, ' -c' , command]
204
204
P = Popen(argv, stdout = PIPE, stderr = PIPE, universal_newlines = True , ** kwds)
205
- (out , err) = P.communicate()
205
+ (_ , err) = P.communicate()
206
206
sys.stdout.write(err)
207
207
208
208
@@ -982,7 +982,7 @@ def test_sig_occurred_dealloc():
982
982
No current exception
983
983
984
984
"""
985
- x = DeallocDebug()
985
+ _ = DeallocDebug()
986
986
sig_str(" test_sig_occurred_dealloc()" )
987
987
abort()
988
988
@@ -1160,9 +1160,8 @@ def sig_on_bench():
1160
1160
>>> sig_on_bench()
1161
1161
1162
1162
"""
1163
- cdef int i
1164
1163
with nogil:
1165
- for i in range (1000000 ):
1164
+ for _ in range (1000000 ):
1166
1165
sig_on()
1167
1166
sig_off()
1168
1167
@@ -1176,9 +1175,8 @@ def sig_check_bench():
1176
1175
>>> sig_check_bench()
1177
1176
1178
1177
"""
1179
- cdef int i
1180
1178
with nogil:
1181
- for i in range (1000000 ):
1179
+ for _ in range (1000000 ):
1182
1180
sig_check()
1183
1181
1184
1182
@@ -1298,8 +1296,7 @@ def test_thread_sig_block(long delay=DEFAULT_DELAY):
1298
1296
1299
1297
cdef void * func_thread_sig_block(void * ignored) noexcept with gil:
1300
1298
# This is executed by the two threads spawned by test_thread_sig_block()
1301
- cdef int n
1302
- for n in range (1000000 ):
1299
+ for _ in range (1000000 ):
1303
1300
sig_block()
1304
1301
if not (1 <= cysigs.block_sigint <= 2 ):
1305
1302
PyErr_SetString(RuntimeError , " sig_block() is not thread-safe" )
0 commit comments