Skip to content

Mechanical lint cleanup across the package - #57

Merged
galjos merged 1 commit into
mainfrom
mechanical-lint-cleanup
Jun 29, 2026
Merged

Mechanical lint cleanup across the package#57
galjos merged 1 commit into
mainfrom
mechanical-lint-cleanup

Conversation

@galjos

@galjos galjos commented Jun 29, 2026

Copy link
Copy Markdown
Member

Behaviour-preserving lint cleanup, driven by ruff + pylint and guarded by the full test suite (159 passed with the DFTB+ binaries, 0 skipped). No logic changes.

Changes (all mechanical)

  • Strip trailing whitespace; add missing final newlines.
  • Remove useless return / return None at the end of functions.
  • Drop superfluous else after return (dedent only; the prior else bodies call logger.error(..., exception=...), which raises, so control flow is unchanged).
  • == None -> is None.
  • Convert leftover %-formatted strings to f-strings.
  • Add module docstrings (skipping the setuptools_scm-generated __version__.py).

Result

  • pylint 7.40 -> 8.79.
  • Remaining lint is structural and intentionally left out of this pass: attribute-defined-outside-init (Thermo sets totals in run()), invalid-name (overlaps Clean up rotational inertia naming #37), inconsistent-return-statements (the log-and-raise pattern), too-many-arguments, cyclic-import. Those want dedicated, careful PRs.

Behaviour-preserving cleanup driven by ruff and pylint, guarded by the full
test suite (159 passed with the DFTB+ binaries):

- strip trailing whitespace and add missing final newlines
- remove useless return / return None at function ends
- drop superfluous else after return
- use 'is None' instead of '== None'
- convert leftover %-formatted strings to f-strings
- add module docstrings

No logic changes. pylint 7.40 -> 8.79.
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.25%. Comparing base (714a996) to head (ca7950f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
- Coverage   95.30%   95.25%   -0.05%     
==========================================
  Files          22       22              
  Lines        1321     1286      -35     
==========================================
- Hits         1259     1225      -34     
+ Misses         62       61       -1     
Flag Coverage Δ
unittests 95.25% <100.00%> (-0.05%) ⬇️

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

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

@galjos
galjos merged commit eacd9ea into main Jun 29, 2026
3 checks passed
@galjos
galjos deleted the mechanical-lint-cleanup branch June 29, 2026 07:03
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