build: bump ruff to 0.15.12 and enforce top-level imports#1592
Open
hkad98 wants to merge 1 commit intogooddata:masterfrom
Open
build: bump ruff to 0.15.12 and enforce top-level imports#1592hkad98 wants to merge 1 commit intogooddata:masterfrom
hkad98 wants to merge 1 commit intogooddata:masterfrom
Conversation
Bump ruff from 0.15.10 to 0.15.12 in uv.lock and enable PLC0415 (import-outside-top-level) in tool.ruff.lint.select to enforce the existing convention that imports live at the module top level. Move habitual lazy imports up to module top in client.py, workspace_data_filters.py, environment.py, conftest.py, test_aac.py, test_catalog_user_service.py, test_tabbed_dashboard_translations.py, and test_bare_execution_response.py. Annotate genuinely lazy imports with noqa: PLC0415 where they are required: optional dependencies guarded by try/except ImportError (github, deep_translator), optional opentelemetry exporters declared as allowed-unresolved-imports, and scripts/docs test fixtures that import after monkeypatch.syspath_prepend. JIRA: TRIVIAL risk: low
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1592 +/- ##
=======================================
Coverage 78.96% 78.96%
=======================================
Files 231 231
Lines 15578 15578
=======================================
Hits 12301 12301
Misses 3277 3277 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps ruff from 0.15.10 to 0.15.12 in
uv.lockand addsPLC0415(import-outside-top-level) totool.ruff.lint.selectto enforce the existing convention that imports live at the module top level.Habitual lazy imports were lifted to module top in
client.py,workspace_data_filters.py,environment.py,conftest.py,test_aac.py,test_catalog_user_service.py,test_tabbed_dashboard_translations.py, andtest_bare_execution_response.py.# noqa: PLC0415was added only where the lazy pattern is genuinely required:try/except ImportError(github,deep_translator)opentelemetry.exporter.*exporters declared asallowed-unresolved-importsscripts/docs/tests/*fixtures that import aftermonkeypatch.syspath_prependTest plan
JIRA: TRIVIAL
risk: low