pyaerocom
pyaerocom copied to clipboard
lint with ruff
Change Summary
Use ruff to improve and maintain coding standards.
- [ ] replace
blackandisortwithruff format - [ ] implement improvements suggested by
ruff check - [ ] update
pre-commitconfiguration - [ ] update the relevant CI job
At the moment ruff check --statistics reports ~583 improvements:
-
E713: Test for membership should benot in -
F841: Local variable is assigned to but never used -
UP038: UseX | Yin call instead of(X, Y) -
E722: Do not use bareexcept -
F401: Module imported but unused -
F541: f-string without any placeholders -
UP007: UseX | Yfor type annotations -
E731: Do not assign alambdaexpression, use adef -
UP032: Use f-string instead offormatcall -
F821: Undefined name -
E711: Comparison toNoneshould beis None -
E741: Ambiguous variable name -
E712: Avoid equality comparisons toTrue -
E721: Do not compare types, useisinstance() -
UP031: Use format specifiers instead of percent format -
UP034: Avoid extraneous parentheses -
UP015: Unnecessary open mode parameters -
UP035: Deprecated import -
F402: Import shadowed by loop variable -
F811: Redefinition of unused module/method/variable -
UP006: Usetuple/list/dictinstead ofTuple/List/Dictfor type annotation -
UP018: Unnecessaryfloat/intcall -
E714: Test for object identity should beis not
Related issue number
close #1119
Checklist
- [X] Start with a draft-PR
- [X] The PR title is a good summary of the changes
- [X] PR is set to AeroTools and a tentative milestone
- [X] Documentation reflects the changes where applicable
- [ ] Tests for the changes exist where applicable
- [ ] Tests pass locally
- [ ] Tests pass on CI
- [ ] At least 1 reviewer is selected
- [ ] Make PR ready to review
Codecov Report
Attention: Patch coverage is 76.10837% with 97 lines in your changes missing coverage. Please review.
Project coverage is 78.98%. Comparing base (
654afb8) to head (73910e7). Report is 294 commits behind head on main-dev.
Additional details and impacted files
@@ Coverage Diff @@
## main-dev #1129 +/- ##
============================================
+ Coverage 78.96% 78.98% +0.01%
============================================
Files 136 136
Lines 20813 20792 -21
============================================
- Hits 16436 16423 -13
+ Misses 4377 4369 -8
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 78.98% <76.10%> (+0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.