Skip to content
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

Last batch of ruff rules #658

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Nov 24, 2024

Last batch of ruff rules, upgrade to ruff 0.8.0

TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.92%. Comparing base (1855f0c) to head (80cec26).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #658      +/-   ##
==========================================
- Coverage   99.92%   99.92%   -0.01%     
==========================================
  Files          62       62              
  Lines        2721     2708      -13     
==========================================
- Hits         2719     2706      -13     
  Misses          2        2              
Files with missing lines Coverage Δ
numcodecs/astype.py 100.00% <100.00%> (ø)
numcodecs/base64.py 100.00% <100.00%> (ø)
numcodecs/categorize.py 100.00% <100.00%> (ø)
numcodecs/delta.py 100.00% <100.00%> (ø)
numcodecs/fixedscaleoffset.py 100.00% <100.00%> (ø)
numcodecs/gzip.py 100.00% <100.00%> (ø)
numcodecs/lzma.py 100.00% <ø> (ø)
numcodecs/ndarray_like.py 100.00% <100.00%> (ø)
numcodecs/pcodec.py 100.00% <100.00%> (ø)
numcodecs/quantize.py 100.00% <100.00%> (ø)
... and 4 more

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the final_ruff branch 2 times, most recently from 33e6a12 to 5f3086a Compare November 24, 2024 20:35
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review November 29, 2024 16:01
The directories to consider when resolving first- vs. third-party imports.
The linter includes some rules that, when enabled, can cause conflicts
with the formatter, leading to unexpected behavior. None None of these
rules are included in Ruff's default configuration. However, since we
have enabled some relevant rule sets, we disable these rules.
SIM105 Use `contextlib.suppress(ImportError)` instead of `try`-`except`-`pass`
TRY301 Abstract `raise` to an inner function
B904 Within an `except` clause, raise exceptions with `raise ... from err`
     or `raise ... from None` to distinguish them from errors in exception
     handling
B028 No explicit `stacklevel` keyword argument found
RUF022 `__all__` is not sorted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant