Skip to content

Audit disabled lint rules and adopt the low-risk subset#194

Merged
AndrewSazonov merged 28 commits into
developfrom
lint-rule-deferred-adoption
Jun 5, 2026
Merged

Audit disabled lint rules and adopt the low-risk subset#194
AndrewSazonov merged 28 commits into
developfrom
lint-rule-deferred-adoption

Conversation

@AndrewSazonov
Copy link
Copy Markdown
Member

Inventories every disabled Ruff rule, measures how many issues each would
raise today, and recommends — rule by rule — which to switch on (with fixes)
and which to keep off because they reflect deliberate conventions. The
roadmap lives in docs/dev/plans/lint-rule-audit.md, with a
tools/lint_rule_audit.py helper that regenerates the inventory on demand.

Acts on the low-risk subset:

  • Priority 0 — remove 5 ignores that flag nothing (B011, B017,
    N805, PLE, docs ANN).
  • Priority 1D100/D104 module & package docstrings (79 added),
    DTZ005, the TD004/TD005 TODO-format rules, and test hygiene
    (I001/E501/F841).
  • Tier B — enforce more pytest-lint sub-codes (PLR/PLW in tests) and
    route the library's stray diagnostic print()s through its Logger
    (T20).

Also refreshes the saved tutorial fit-result baselines for the merged
auto_estimate background feature (#193). Remaining Tier-B/C rules are
documented as deliberate keep-disabled recommendations.

Verification: pixi run check, unit-tests (2092), integration-tests
(160), and script-tests (25) all pass.

🤖 Generated with Claude Code

@AndrewSazonov AndrewSazonov added the [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) label Jun 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 43.75000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.24%. Comparing base (883c384) to head (6e3aeb3).
⚠️ Report is 101 commits behind head on develop.

Files with missing lines Patch % Lines
src/easydiffraction/analysis/calculators/cryspy.py 25.00% 3 Missing ⚠️
...easydiffraction/datablocks/experiment/item/base.py 0.00% 3 Missing ⚠️
...rc/easydiffraction/analysis/calculators/crysfml.py 33.33% 2 Missing ⚠️
src/easydiffraction/core/singleton.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #194      +/-   ##
===========================================
- Coverage    82.26%   80.24%   -2.02%     
===========================================
  Files           88      263     +175     
  Lines         5451    22210   +16759     
  Branches       454     2587    +2133     
===========================================
+ Hits          4484    17823   +13339     
- Misses         802     3411    +2609     
- Partials       165      976     +811     
Flag Coverage Δ
integration ?
unittests 80.24% <43.75%> (+7.80%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easydiffraction/__init__.py 100.00% <ø> (ø)
src/easydiffraction/__main__.py 73.10% <ø> (-0.81%) ⬇️
src/easydiffraction/analysis/__init__.py 100.00% <ø> (ø)
src/easydiffraction/analysis/analysis.py 62.75% <ø> (-4.58%) ⬇️
...c/easydiffraction/analysis/calculators/__init__.py 100.00% <ø> (ø)
src/easydiffraction/analysis/calculators/base.py 93.54% <ø> (+12.59%) ⬆️
src/easydiffraction/analysis/calculators/pdffit.py 89.09% <100.00%> (-4.53%) ⬇️
...rc/easydiffraction/analysis/categories/__init__.py 100.00% <ø> (ø)
...iffraction/analysis/categories/aliases/__init__.py 100.00% <ø> (ø)
...diffraction/analysis/categories/aliases/default.py 100.00% <ø> (ø)
... and 66 more

... and 212 files with indirect coverage changes

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

@AndrewSazonov AndrewSazonov merged commit 9a50e51 into develop Jun 5, 2026
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant