Skip to content

build: bump ruff to 0.15.12 and enforce top-level imports#1592

Open
hkad98 wants to merge 1 commit intogooddata:masterfrom
hkad98:jkd/bump-ruff
Open

build: bump ruff to 0.15.12 and enforce top-level imports#1592
hkad98 wants to merge 1 commit intogooddata:masterfrom
hkad98:jkd/bump-ruff

Conversation

@hkad98
Copy link
Copy Markdown
Contributor

@hkad98 hkad98 commented May 10, 2026

Summary

Bumps ruff from 0.15.10 to 0.15.12 in uv.lock and adds PLC0415 (import-outside-top-level) to tool.ruff.lint.select to 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, and test_bare_execution_response.py. # noqa: PLC0415 was added only where the lazy pattern is genuinely required:

  • Optional dependencies guarded by try/except ImportError (github, deep_translator)
  • Optional opentelemetry.exporter.* exporters declared as allowed-unresolved-imports
  • scripts/docs/tests/* fixtures that import after monkeypatch.syspath_prepend

Test plan

JIRA: TRIVIAL
risk: low

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
@hkad98 hkad98 requested review from jaceksan, lupko and pcerny as code owners May 10, 2026 19:51
@hkad98 hkad98 enabled auto-merge May 10, 2026 19:52
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.96%. Comparing base (e53ef3e) to head (9c4b754).

Files with missing lines Patch % Lines
...r/src/gooddata_flight_server/utils/otel_tracing.py 0.00% 3 Missing ⚠️
...ckages/gooddata-dbt/src/gooddata_dbt/dbt_plugin.py 0.00% 1 Missing ⚠️
packages/gooddata-dbt/src/gooddata_dbt/utils.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant