Improve loops and lists (#113269)

* Enable PERF

* Enable PERF rule

* Enable PERF rule

* Don't enable flag yet
This commit is contained in:
Joost Lekkerkerker
2024-03-14 10:22:20 +01:00
committed by GitHub
parent 8a98fb7cfd
commit 05172d8e4d
30 changed files with 125 additions and 172 deletions

View File

@@ -21,10 +21,7 @@ async def test_executor_shutdown_can_interrupt_threads(
while True:
time.sleep(0.1)
sleep_futures = []
for _ in range(100):
sleep_futures.append(iexecutor.submit(_loop_sleep_in_executor))
sleep_futures = [iexecutor.submit(_loop_sleep_in_executor) for _ in range(100)]
iexecutor.shutdown()