Repository navigation
Conversation
Use PEP 585/604 builtins and unions (UP006, UP045), make implicit Optional defaults explicit (RUF013, plus UxDataset.from_xarray's uxgrid, which ruff does not flag), import ABCs from collections.abc (UP035), drop quoted annotations (UP037), use the PEP 695 `type` statement for aliases (UP040), drop redundant `int | float` (PYI041), mark the mutable class default as ClassVar (RUF012), and remove the typing imports these leave unused (F401). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite set(<genexpr>)/set([...])/list([...])/dict() as comprehensions or literals (C401, C403, C405, C408, C411) and use next(iter(...)) instead of building a list to take its first element (RUF015). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Convert str.format calls to f-strings (UP032) and use !r instead of repr() inside f-strings (RUF010). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop extraneous parentheses (UP034), round() on values that are already integers (RUF057), and int() around round(), which already returns an int under numpy>=2 (RUF046). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collapse nested ifs that have no else branch (SIM102), return boolean conditions directly (SIM103), iterate dicts instead of .keys() (SIM118), use min()/max() instead of compare-and-assign (PLR1730), drop a no-op pass and range(0, n) starts (PIE790, PIE808), and remove a try/except that only re-raised (TRY203). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename tuple-unpacking targets that are never read to _name (RUF059), keeping the unpack itself so the shape of each return value stays visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use `from package import module` instead of import-as aliases (PLR0402), import MagicMock from unittest.mock unconditionally (UP026; the `mock` backport is never needed on Python 3.12), use functools.cache (UP033), and remove F401 noqa markers that docs/* already ignores (RUF100) while keeping their explanatory comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sort __all__ and __slots__ entries (RUF022, RUF023). docs/conf.py set __all__ to a tuple of modules to mark imports as used (PLE0604); F401 is already ignored for docs/*, so the line is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- callable(x) instead of hasattr(x, "__call__") (B004) - plain attribute assignment instead of setattr with a constant (B010) - don't shadow the face_nodes argument with the loop variable (B020, PLR1704) - pass *args before keyword arguments; Python already bound them positionally first, so behavior is unchanged (B026) - np.isnan instead of x != x self-comparisons in the SCRIP dedup (PLR0124) - don't rebind `self` to the result of the exact-join xr.align check in weighted_mean; with join="exact" align either raises or returns objects with the same indexes, so only weights is kept (PLW0642) - drop a useless bare expression in area_calc.ipynb (B018) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uxarray/__init__.py: importlib.metadata is always available on Python 3.12, so drop the importlib_metadata fallback and catch only PackageNotFoundError when the package isn't installed. The remaining `except Exception` blocks are deliberate catch-all fallbacks (axes extent auto-set, open_dataset engine retry, the IPython matplotlib backend switch, numba FMA toolchain probes), so they get `# noqa: BLE001` (and S110 for the try/except/pass) instead of a guessed narrower exception type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notebook has no shebang and is not meant to be executed directly (EXE002). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop a stray `#` after a raise statement (PLR2044). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Notebooks changed:
Review visual diffs and comment on any notebook cell. All comments sync back to this PR. Powered by ReviewNB |
cmdupuis3
marked this pull request as draft
November 18, 2026 20:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1858
Overview
PR Checklist
General
Testing & Benchmarking
Documentation and Examples
docs/api.rst; internal (private) function names start with an underscore (_)AI Disclosure
AI Usage: Claude Opus 5.5 for edits and merges