Skip to content

chore(lint): add new ruff rules #1642

Draft
mesejo wants to merge 4 commits intomainfrom
add-ruff-lint-rules
Draft

chore(lint): add new ruff rules #1642
mesejo wants to merge 4 commits intomainfrom
add-ruff-lint-rules

Conversation

@mesejo
Copy link
Collaborator

@mesejo mesejo commented Feb 27, 2026

Add B, C4, FURB, PLR2004, PLR6301, SIM rule sets to ruff extend-select, add pylint W0201. Suppress vendor/ from all new rules; suppress examples/ and docs/ from PLR2004, B905, SIM; suppress tests from PLR2004.

Fix all B019 violations: remove @cache from trivially cheap frozen-attrs properties in tui.py; add # noqa: B019 where caching is intentional on slotted frozen classes (process handles, temp dirs, ML models, connections).

Fix all B904 violations: add as err + raise ... from err in 13 except blocks across executor, datafusion, cli, dask_normalize_expr, env_utils, ibis_utils, import_utils, quickgrove_lib, split_lib, ibis_yaml modules.

Apply all ruff auto-fixes (safe + unsafe) for the remaining rules across the codebase; add # noqa where patterns are intentional (B008 sentinels, B018 side-effect property access, B017 environment-dependent exceptions, B023/B024/B027 abstract base classes, SIM117 contextlib.suppress nesting).

…tions

Add B, C4, FURB, PLR2004, PLR6301, SIM rule sets to ruff extend-select,
add pylint W0201. Suppress vendor/ from all new rules; suppress examples/
and docs/ from PLR2004, B905, SIM; suppress tests from PLR2004.

Fix all B019 violations: remove @cache from trivially cheap frozen-attrs
properties in tui.py; add # noqa: B019 where caching is intentional on
slotted frozen classes (process handles, temp dirs, ML models, connections).

Fix all B904 violations: add `as err` + `raise ... from err` in 13 except
blocks across executor, datafusion, cli, dask_normalize_expr, env_utils,
ibis_utils, import_utils, quickgrove_lib, split_lib, ibis_yaml modules.

Apply all ruff auto-fixes (safe + unsafe) for the remaining rules across
the codebase; add # noqa where patterns are intentional (B008 sentinels,
B018 side-effect property access, B017 environment-dependent exceptions,
B023/B024/B027 abstract base classes, SIM117 contextlib.suppress nesting).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the chore label Feb 27, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 73.52941% with 99 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
python/xorq/backends/xorq/tests/test_udwf.py 53.33% 14 Missing ⚠️
python/xorq/ibis_yaml/translate.py 25.00% 6 Missing ⚠️
python/xorq/backends/xorq/datafusion/__init__.py 42.85% 4 Missing ⚠️
python/xorq/vendor/ibis/backends/sql/datatypes.py 0.00% 4 Missing ⚠️
python/xorq/backends/pandas/executor.py 40.00% 3 Missing ⚠️
python/xorq/backends/snowflake/__init__.py 0.00% 3 Missing ⚠️
python/xorq/expr/ml/quickgrove_lib.py 62.50% 3 Missing ⚠️
python/xorq/internal.py 66.66% 3 Missing ⚠️
python/xorq/vendor/ibis/common/egraph.py 0.00% 3 Missing ⚠️
python/xorq/vendor/ibis/common/patterns.py 25.00% 3 Missing ⚠️
... and 39 more
Files with missing lines Coverage Δ
examples/sklearn_deferred_metrics_inputs.py 100.00% <100.00%> (ø)
examples/sklearn_metrics_comparison.py 98.82% <ø> (ø)
python/xorq/backends/gizmosql/tests/conftest.py 70.12% <100.00%> (ø)
...thon/xorq/backends/gizmosql/tests/test_coverage.py 100.00% <100.00%> (ø)
python/xorq/backends/pandas/helpers.py 96.31% <100.00%> (ø)
python/xorq/backends/pandas/kernels.py 73.41% <100.00%> (+0.26%) ⬆️
python/xorq/backends/pandas/rewrites.py 96.33% <100.00%> (+0.42%) ⬆️
python/xorq/backends/pandas/tests/test_arrays.py 100.00% <100.00%> (ø)
python/xorq/backends/pandas/tests/test_join.py 100.00% <100.00%> (ø)
python/xorq/backends/pandas/tests/test_window.py 99.66% <100.00%> (ø)
... and 148 more

... and 1 file with indirect coverage changes

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

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 27, 2026

Merging this PR will not alter performance

✅ 8 untouched benchmarks


Comparing add-ruff-lint-rules (1cea2cb) with main (a7caba4)

Open in CodSpeed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant