From 36fa16690298be68ddb393fa1424f6773d0add5d Mon Sep 17 00:00:00 2001 From: Zain Dana Harper Date: Mon, 29 Jun 2026 20:02:32 -0700 Subject: [PATCH 1/2] Fix ruff FURB110 lint failure in test filesystem adaptor `lint.select = ["ALL"]` enables FURB110, which flags the `x if x else {}` ternary in `tests/adaptors/filesystem.py` and fails `ruff check` on main. Because the lint job runs in the same workflow as the test matrix, its failure cancels every test job via fail-fast, so all CI checks show red even though the suite itself passes. Replace the two ternaries with the idiomatic `or` operator (the rule's own prescribed fix), which is semantically identical for the falsy-to-{} default. `ruff check` and `ruff format --check` are both clean with the pinned ruff 0.14.8. Co-Authored-By: Claude Opus 4.8 --- tests/adaptors/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/adaptors/filesystem.py b/tests/adaptors/filesystem.py index db471f68..73b85ffa 100644 --- a/tests/adaptors/filesystem.py +++ b/tests/adaptors/filesystem.py @@ -48,8 +48,8 @@ def __init__( """ self.contents = self._parse_contents(contents) self._raw_contents = contents - self.content_map = content_map if content_map else {} - self.mtime_map: dict[str, float] = mtime_map if mtime_map else {} + self.content_map = content_map or {} + self.mtime_map: dict[str, float] = mtime_map or {} @property def sep(self) -> str: From ab39a713648755a2e761db089d485e0999d758b2 Mon Sep 17 00:00:00 2001 From: Zain Dana Harper Date: Mon, 29 Jun 2026 20:19:07 -0700 Subject: [PATCH 2/2] Fix clippy collapsible_match in import_parsing (Rust lint step) After the ruff fix, `just lint` advances to `lint-rust`, where `cargo clippy -- -D warnings` fails on clippy 1.96's collapsible_match in `rust/src/import_parsing.rs`: the `Expr::Attribute` match arm wraps an `if expr.attr.id == "TYPE_CHECKING" { ... } else { walk_stmt(...) }`. Collapse it into a pattern guard (clippy's own suggested fix). The else branch was identical to the `_ =>` fallthrough, so when the guard is false the statement is still walked via that arm. Behavior is unchanged. Verified with the CI toolchain (rust 1.96.0): cargo fmt --check -> clean cargo clippy ... -D warnings -> clean Co-Authored-By: Claude Opus 4.8 --- rust/src/import_parsing.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/rust/src/import_parsing.rs b/rust/src/import_parsing.rs index ba9d79e0..bf21a9eb 100644 --- a/rust/src/import_parsing.rs +++ b/rust/src/import_parsing.rs @@ -127,14 +127,10 @@ impl<'a> StatementVisitor<'a> for Visitor<'a> { walk_stmt(self, stmt); } } - Expr::Attribute(expr) => { - if expr.attr.id == "TYPE_CHECKING" { - self.typechecking_only = true; - walk_stmt(self, stmt); - self.typechecking_only = false; - } else { - walk_stmt(self, stmt); - } + Expr::Attribute(expr) if expr.attr.id == "TYPE_CHECKING" => { + self.typechecking_only = true; + walk_stmt(self, stmt); + self.typechecking_only = false; } _ => { walk_stmt(self, stmt);