Skip to content

chore: enable 11 additional ruff lint rule sets#373

Open
ssrhaso wants to merge 1 commit intomainfrom
chore/enable-ruff-rules
Open

chore: enable 11 additional ruff lint rule sets#373
ssrhaso wants to merge 1 commit intomainfrom
chore/enable-ruff-rules

Conversation

@ssrhaso
Copy link
Copy Markdown
Contributor

@ssrhaso ssrhaso commented Mar 31, 2026

Enable 11 previously-disabled ruff rule sets via config-only changes to pyproject.toml. No Python source files were modified.

Enabled rule sets

C4, DTZ, E, EM, PD, PLR, PLW, RET, S, SIM, T20

Left disabled

ERA - 42 violations across tests, notebooks, and source files. Better suited as a dedicated cleanup PR.

Strategy

  • Threshold tuning: max-args = 12, max-returns = 10
  • Global ignores (9 rules): E501, PD009, PD010, PD013, PLR2004, RET504, S101, S301
  • Per-file-ignores: targeted suppression for 8 file patterns
  • Cleanup: removed old commented-out ANN101 and S301 lines

Future refactoring candidates

Per-file-ignores that could be removed after dedicated cleanup PRs:

  • acro/acro_tables.py - PLR0913, PLR1714, SIM102, SIM108, PLW2901, EM, PD002, PD011, PD101
  • acro/acro_stata_parser.py - C417, PLR5501, T20
  • acro/record.py - DTZ005, EM, PLW2901, T20
  • acro/acro.py - SIM113
  • acro/utils.py - PD002
    @rpreen

Closes #348

@ssrhaso ssrhaso requested a review from rpreen March 31, 2026 13:04
@ssrhaso ssrhaso self-assigned this Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.70%. Comparing base (fe1f204) to head (1f6ed23).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #373   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files           9        9           
  Lines        1354     1354           
=======================================
  Hits         1350     1350           
  Misses          4        4           

☔ 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.

[Chore] Remove all in-file disable pragmas

1 participant