Skip to content

Commit 2c96379

Browse files
keep the linter updates
1 parent e6c9c44 commit 2c96379

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

elastic_transport/_node/_http_aiohttp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

tests/async_/test_async_transport.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff 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

tests/test_node_pool.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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

tests/test_transport.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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

utils/build-dists.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def set_tmp_dir():
5454

5555

5656
def run(argv, expect_exit_code=0):
57-
global tmp_dir
5857
if tmp_dir is None:
5958
os.chdir(base_dir)
6059
else:

0 commit comments

Comments
 (0)