Skip to content

Add PIE and B lints #3573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025
Merged

Add PIE and B lints #3573

merged 2 commits into from
Apr 10, 2025

Conversation

flying-sheep
Copy link
Member

@flying-sheep flying-sheep commented Apr 10, 2025

Also sort lints. learnings:

  • B028 no-explicit-stacklevel: the suggested “2” is for user-facing functions, one has to add 1 depending how deep in the stack one is
  • B905 zip-without-explicit-strict: should almost always be strict=True, not as autofixed False (except for cyclers)
  • B904 raise-without-from-inside-except: should almost always be raise … from e, except when using an exception instead of a check (i.e. the caught exception isn’t an error, but an expected branching)

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 59.34066% with 74 lines in your changes missing coverage. Please review.

Project coverage is 75.48%. Comparing base (f11789e) to head (413cc48).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/scanpy/readwrite.py 90.16% 6 Missing ⚠️
src/scanpy/_utils/__init__.py 60.00% 4 Missing ⚠️
src/scanpy/external/tl/_phenograph.py 0.00% 4 Missing ⚠️
src/scanpy/queries/_queries.py 0.00% 4 Missing ⚠️
src/scanpy/external/pp/_magic.py 0.00% 3 Missing ⚠️
src/scanpy/tools/_sim.py 50.00% 3 Missing ⚠️
src/scanpy/external/exporting.py 0.00% 2 Missing ⚠️
src/scanpy/external/pl.py 0.00% 2 Missing ⚠️
src/scanpy/external/pp/_bbknn.py 0.00% 2 Missing ⚠️
src/scanpy/external/pp/_dca.py 0.00% 2 Missing ⚠️
... and 26 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3573      +/-   ##
==========================================
- Coverage   75.51%   75.48%   -0.04%     
==========================================
  Files         113      113              
  Lines       13178    13169       -9     
==========================================
- Hits         9952     9941      -11     
- Misses       3226     3228       +2     
Files with missing lines Coverage Δ
src/scanpy/_compat.py 76.99% <100.00%> (ø)
src/scanpy/_version.py 100.00% <ø> (ø)
src/scanpy/cli.py 89.87% <100.00%> (-3.88%) ⬇️
...c/scanpy/experimental/pp/_highly_variable_genes.py 62.73% <ø> (ø)
src/scanpy/experimental/pp/_normalization.py 94.04% <ø> (ø)
src/scanpy/experimental/pp/_recipes.py 100.00% <100.00%> (ø)
src/scanpy/metrics/_common.py 91.25% <ø> (ø)
src/scanpy/plotting/_baseplot_class.py 88.92% <ø> (ø)
src/scanpy/plotting/_preprocessing.py 87.71% <ø> (ø)
src/scanpy/plotting/_tools/scatterplots.py 84.25% <100.00%> (ø)
... and 46 more

@flying-sheep flying-sheep merged commit 8162c52 into main Apr 10, 2025
19 of 21 checks passed
@flying-sheep flying-sheep deleted the pa/bugbear branch April 10, 2025 16:26
flying-sheep added a commit that referenced this pull request Apr 10, 2025
@scverse scverse deleted a comment from lumberbot-app bot Apr 10, 2025
selmanozleyen pushed a commit to selmanozleyen/scanpy that referenced this pull request Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant