Skip to content

Commit 02b0053

Browse files
committed
🚨(project) ignore PLC0415 ruff rule in specific cases
There are times when you explictly do not want to import a module in the global scope.
1 parent cda922d commit 02b0053

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

β€Žsrc/onzr/cli.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,6 @@ def version():
816816
@require_server
817817
def openapi():
818818
"""Get Onzr HTTP API OpenAPI schema."""
819-
from onzr.server import app
819+
from onzr.server import app # noqa: PLC0415
820820

821821
sys.stdout.write(f"{json.dumps(app.openapi())}\n")

β€Žtests/conftest.pyβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def configured_onzr(responses, app_configuration):
147147
@pytest.fixture
148148
def client(configured_onzr):
149149
"""A test client configured for the server."""
150-
from onzr import server
150+
from onzr import server # noqa: PLC0415
151151

152152
def get_configured_onzr():
153153
return configured_onzr
@@ -164,7 +164,7 @@ def test_server(responses, settings, configured_onzr):
164164
This fixture is costly and should only be run for integration testing such as an
165165
API client without mocking the server.
166166
"""
167-
from onzr import server as onzr_server
167+
from onzr import server as onzr_server # noqa: PLC0415
168168

169169
def get_configured_onzr():
170170
return configured_onzr

0 commit comments

Comments
Β (0)