napari / napari

napari: a fast, interactive, multi-dimensional image viewer for python
https://napari.org
BSD 3-Clause "New" or "Revised" License
2.07k stars 410 forks source link

Add a few ruff lint rules: ASYNC, EXE, FA and LOG #6840

Closed brisvag closed 3 weeks ago

brisvag commented 1 month ago

References

Tracking issue: #5589

Description

This PR adds a few rules to be checked by ruff. Some of them required no changes or very little; you can click on individual commits to see them one by one. ~The only one that needs discussion is T20 (print statements) which required a few ignores.~ EDIT: moved it to #6849

The rules are:

I'm going through a few more, but might split out into separate PRs. Happy to split this one out as well.

~EDIT: depends on #6775~ No longer true, rebased on main and it's fine.

brisvag commented 1 month ago

I moved the T20 rule to #6849, so we can keep things cleaner and discuss whether to use it and how to integrate it there.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.39%. Comparing base (ba73456) to head (708e166). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6840 +/- ## ========================================== - Coverage 92.45% 92.39% -0.06% ========================================== Files 614 614 Lines 54852 54853 +1 ========================================== - Hits 50712 50683 -29 - Misses 4140 4170 +30 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.