Skip to content

Use ruff lint.extend-select to keep ruff's default rules - #836

Merged
youtux merged 3 commits into
masterfrom
ruff-extend-select
Sep 29, 2026
Merged

youtux merged 3 commits into
masterfrom
ruff-extend-select

Conversation

@Pierre-Sassoulas

@Pierre-Sassoulas Pierre-Sassoulas commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Ruff 0.16 enables a much larger default rule set. 'lint.select' was replacing it entirely; 'lint.extend-select' keeps the defaults and adds our own selection on top.

Fix the new violations:

  • RUF022: sort __all__
  • RUF046: drop redundant int() around math.floor()
  • RUF059: use _ for unused unpacked variables
  • PLW0127: remove self-assignment of scenario_name
  • TRY002: raise pytest.UsageError instead of a bare Exception for gherkin-terminal-reporter incompatibilities

@Pierre-Sassoulas Pierre-Sassoulas added internal Internal work dependencies Pull requests that update a dependency file labels Sep 29, 2026
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.31%. Comparing base (f67096a) to head (75c12e6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #836      +/-   ##
==========================================
+ Coverage   96.13%   96.31%   +0.18%     
==========================================
  Files          55       55              
  Lines        2430     2442      +12     
  Branches      137      137              
==========================================
+ Hits         2336     2352      +16     
+ Misses         57       55       -2     
+ Partials       37       35       -2     

☔ View full report in Codecov by Harness.
📢 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.

Base automatically changed from pre-commit-ci-update-config to master September 29, 2026 07:23
Ruff 0.16 enables a much larger default rule set. 'lint.select' was
replacing it entirely; 'lint.extend-select' keeps the defaults and adds
our own selection on top.

Fix the new violations:
- RUF022: sort __all__
- RUF046: drop redundant int() around math.floor()
- RUF059: use _ for unused unpacked variables
- PLW0127: remove self-assignment of scenario_name
- TRY002: raise pytest.UsageError instead of a bare Exception for
  gherkin-terminal-reporter incompatibilities
Cover both pytest.UsageError paths: another terminal reporter in use,
and xdist enabled.
@Pierre-Sassoulas
Pierre-Sassoulas marked this pull request as draft September 29, 2026 07:41
Most tox environments don't install pytest-xdist. Register a dummy
'dsession' plugin instead, which is what the check looks for.
@Pierre-Sassoulas
Pierre-Sassoulas marked this pull request as ready for review September 29, 2026 08:01
@Pierre-Sassoulas

Copy link
Copy Markdown
Member Author

I added a test to cover a line that was modified but not covered.

@youtux
youtux merged commit 9eb8a78 into master Sep 29, 2026
20 checks passed
@youtux
youtux deleted the ruff-extend-select branch September 29, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file internal Internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants