Mechanical lint cleanup across the package - #57
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
return/return Noneat the end of functions.elseafterreturn(dedent only; the priorelsebodies calllogger.error(..., exception=...), which raises, so control flow is unchanged).== None->is None.%-formatted strings to f-strings.__version__.py).Result
attribute-defined-outside-init(Thermo sets totals inrun()),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.