-
Notifications
You must be signed in to change notification settings - Fork 2k
[flake8-async] ASYNC100 false positive in async generator expressions #13637
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Hi!
ASYNC100 doesn't trigger with this code:
import asyncio
async def long_running_range():
for i in range(10):
await asyncio.sleep(2)
yield i
async def main():
async with asyncio.timeout(7):
async for i in long_running_range():
print(i)
asyncio.run(main())but it does with this code:
import asyncio
async def long_running_range():
for i in range(10):
await asyncio.sleep(2)
yield i
async def main():
async with asyncio.timeout(7):
print({i async for i in long_running_range()})
asyncio.run(main())Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersruleImplementing or modifying a lint ruleImplementing or modifying a lint rule