Skip to content

Commit 1a76a27

Browse files
Apply ruff/flake8-bugbear rule B009
B009 Do not call `getattr` with a constant attribute value. It is not any safer than normal property access.
1 parent 74f4c96 commit 1a76a27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uvloop/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ def install() -> None:
161161

162162
class EventLoopPolicy(
163163
# This is to avoid a mypy error about AbstractEventLoopPolicy
164-
getattr(__asyncio, 'AbstractEventLoopPolicy') # type: ignore[misc]
164+
getattr( # type: ignore[misc]
165+
__asyncio, 'AbstractEventLoopPolicy'
166+
) # noqa: B009
165167
):
166168
"""Event loop policy for uvloop.
167169

0 commit comments

Comments
 (0)