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 pytest-style rules for ruff #6842

Closed brisvag closed 3 weeks ago

brisvag commented 1 month ago

References and relevant issues

Tracking issue: #5589 Followup on #6840 (though independent).

Description

Add the PT rule to check use of fixtures and other pytest things. It fixed some formal stuff, but also caught quite a few mistakes.

The two main changes are:

brisvag commented 4 weeks ago

These failures are confusing... @Czaki any ideas? ^^'

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 99.12536% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 92.40%. Comparing base (a491e60) to head (8afecec). Report is 1 commits behind head on main.

Files Patch % Lines
...layers/points/_tests/test_points_mouse_bindings.py 66.66% 1 Missing :warning:
...layers/shapes/_tests/test_shapes_mouse_bindings.py 50.00% 1 Missing :warning:
napari/utils/_testsupport.py 87.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6842 +/- ## ========================================== - Coverage 92.45% 92.40% -0.05% ========================================== Files 614 614 Lines 54856 54862 +6 ========================================== - Hits 50715 50695 -20 - Misses 4141 4167 +26 ```

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