File tree Expand file tree Collapse file tree 5 files changed +2
-14
lines changed Expand file tree Collapse file tree 5 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ async def perform_request( # type: ignore[override]
141141 headers : Optional [HttpHeaders ] = None ,
142142 request_timeout : Union [DefaultType , Optional [float ]] = DEFAULT ,
143143 ) -> NodeApiResponse :
144- global _AIOHTTP_FIXED_HEAD_BUG
145144 if self .session is None :
146145 self ._create_aiohttp_session ()
147146 assert self .session is not None
Original file line number Diff line number Diff line change @@ -393,7 +393,6 @@ async def test_sniff_on_start():
393393 calls = []
394394
395395 def sniff_callback (* args ):
396- nonlocal calls
397396 calls .append (args )
398397 return [NodeConfig ("http" , "localhost" , 80 )]
399398
@@ -420,7 +419,6 @@ async def test_sniff_before_requests():
420419 calls = []
421420
422421 def sniff_callback (* args ):
423- nonlocal calls
424422 calls .append (args )
425423 return []
426424
@@ -446,7 +444,6 @@ async def test_sniff_on_node_failure():
446444 calls = []
447445
448446 def sniff_callback (* args ):
449- nonlocal calls
450447 calls .append (args )
451448 return []
452449
@@ -551,15 +548,15 @@ async def test_sniffed_nodes_added_to_pool(async_sniff_callback):
551548 if async_sniff_callback :
552549
553550 async def sniff_callback (* _ ):
554- nonlocal loop , sniffed_at
551+ nonlocal sniffed_at
555552 await asyncio .sleep (0.1 )
556553 sniffed_at = loop .time ()
557554 return sniffed_nodes
558555
559556 else :
560557
561558 def sniff_callback (* _ ):
562- nonlocal loop , sniffed_at
559+ nonlocal sniffed_at
563560 time .sleep (0.1 )
564561 sniffed_at = loop .time ()
565562 return sniffed_nodes
Original file line number Diff line number Diff line change @@ -245,8 +245,6 @@ def __init__(self):
245245 self .nodes_gotten = 0
246246
247247 def run (self ) -> None :
248- nonlocal pool
249-
250248 while time .time () < start + 2 :
251249 node = pool .get ()
252250 self .nodes_gotten += 1
Original file line number Diff line number Diff line change @@ -434,7 +434,6 @@ def test_sniff_on_start():
434434 calls = []
435435
436436 def sniff_callback (* args ):
437- nonlocal calls
438437 calls .append (args )
439438 return [NodeConfig ("http" , "localhost" , 80 )]
440439
@@ -458,7 +457,6 @@ def test_sniff_before_requests():
458457 calls = []
459458
460459 def sniff_callback (* args ):
461- nonlocal calls
462460 calls .append (args )
463461 return []
464462
@@ -482,7 +480,6 @@ def test_sniff_on_node_failure():
482480 calls = []
483481
484482 def sniff_callback (* args ):
485- nonlocal calls
486483 calls .append (args )
487484 return []
488485
@@ -655,8 +652,6 @@ def __init__(self):
655652 self .successful_requests = 0
656653
657654 def run (self ) -> None :
658- nonlocal t , start
659-
660655 while time .time () < start + 2 :
661656 t .perform_request ("GET" , "/" )
662657 self .successful_requests += 1
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ def set_tmp_dir():
5454
5555
5656def run (argv , expect_exit_code = 0 ):
57- global tmp_dir
5857 if tmp_dir is None :
5958 os .chdir (base_dir )
6059 else :
You can’t perform that action at this time.
0 commit comments