[Bug]: false positive FURB111
when asyncio.get_running_loop()
#343
Labels
bug
Something isn't working
FURB111
when asyncio.get_running_loop()
#343
Has your issue already been fixed?
master
branch? See the docs for instructions on how to setup a local build of Refurb.The Bug
This code with
refurb
will want to beField(default_factory=asyncio.get_running_loop().time)
perFURB111
.The issue is that
asyncio.get_running_loop
can throwRuntimeError: no running event loop
depending on when it's invoked.So the bug report is that if
asyncio.get_running_loop
is part of a factory, perhapsFURB111
should not be raised.Version Info
Python Version
Python 3.12.3
Config File
# N/A
Extra Info
None
The text was updated successfully, but these errors were encountered: