From db7ed86fb1d28e0bfcf7188f7ed309c00f64164c Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:08:11 +0100 Subject: [PATCH 1/2] Apply ruff/flake8-pie rule PIE790 PIE790 Unnecessary `pass` statement --- xarray/namedarray/parallelcompat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/xarray/namedarray/parallelcompat.py b/xarray/namedarray/parallelcompat.py index baa0b92bdb7..6ecc9ae9a2b 100644 --- a/xarray/namedarray/parallelcompat.py +++ b/xarray/namedarray/parallelcompat.py @@ -75,7 +75,6 @@ def load_chunkmanagers( emit_user_level_warning( f"Failed to load chunk manager entrypoint {entrypoint.name} due to {e}. Skipping.", ) - pass available_chunkmanagers = { name: chunkmanager() From d09cd0bc04d9dc10e1da1410edb3caf4454b652d Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:08:57 +0100 Subject: [PATCH 2/2] Apply ruff/flake8-pie rule PIE810 PIE810 Call `endswith` once with a `tuple` --- ci/min_deps_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/min_deps_check.py b/ci/min_deps_check.py index 8e09bb1eb90..1caa6da5e73 100755 --- a/ci/min_deps_check.py +++ b/ci/min_deps_check.py @@ -62,7 +62,7 @@ def parse_requirements(fname) -> Iterator[tuple[str, int, int, int | None]]: pkg, eq, version = row.partition("=") if pkg.rstrip("<>") in IGNORE_DEPS: continue - if pkg.endswith("<") or pkg.endswith(">") or eq != "=": + if pkg.endswith(("<", ">")) or eq != "=": error("package should be pinned with exact version: " + row) continue