@@ -3230,7 +3230,7 @@ def trigger_interrupt():
32303230 interrupt_thread .join (timeout = 1.0 )
32313231
32323232
3233- def test_arrow_c_stream_interrupted ():
3233+ def test_arrow_c_stream_interrupted (): # noqa: C901 PLR0915
32343234 """__arrow_c_stream__ responds to ``KeyboardInterrupt`` signals.
32353235
32363236 Similar to ``test_collect_interrupted`` this test issues a long running
@@ -3318,7 +3318,7 @@ def read_stream():
33183318 read_thread_id = threading .get_ident ()
33193319 try :
33203320 read_started .set ()
3321- result = reader .read_all ()
3321+ reader .read_all ()
33223322 # If we get here, the read completed without interruption
33233323 read_exception .append (RuntimeError ("Read completed without interruption" ))
33243324 except KeyboardInterrupt :
@@ -3346,8 +3346,10 @@ def read_stream():
33463346
33473347 # Check if we got KeyboardInterrupt directly or wrapped in another exception
33483348 exception = read_exception [0 ]
3349- if not (isinstance (exception , type (KeyboardInterrupt )) or
3350- "KeyboardInterrupt" in str (exception )):
3349+ if not (
3350+ isinstance (exception , type (KeyboardInterrupt ))
3351+ or "KeyboardInterrupt" in str (exception )
3352+ ):
33513353 pytest .fail (f"Expected KeyboardInterrupt, got: { exception } " )
33523354
33533355 interrupt_thread .join (timeout = 1.0 )
0 commit comments