From 8ace49879e576e9f9fd34bb5fc9d20633ee7cffa Mon Sep 17 00:00:00 2001 From: jorenham Date: Tue, 21 Apr 2026 14:40:42 +0200 Subject: [PATCH 1/2] fix clippy warnings in `pyrefly_config` --- crates/pyrefly_config/src/environment/mod.rs | 1 + crates/pyrefly_config/src/migration/mypy/regex_converter.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/pyrefly_config/src/environment/mod.rs b/crates/pyrefly_config/src/environment/mod.rs index 0c06cac38c..8134ace5eb 100644 --- a/crates/pyrefly_config/src/environment/mod.rs +++ b/crates/pyrefly_config/src/environment/mod.rs @@ -11,6 +11,7 @@ pub(crate) mod conda; clippy::module_inception, reason = "environment is both the module group and public API" )] +#[allow(clippy::module_inception)] pub mod environment; pub(crate) mod finder; pub mod interpreters; diff --git a/crates/pyrefly_config/src/migration/mypy/regex_converter.rs b/crates/pyrefly_config/src/migration/mypy/regex_converter.rs index 1df99f1459..6ec68135f6 100644 --- a/crates/pyrefly_config/src/migration/mypy/regex_converter.rs +++ b/crates/pyrefly_config/src/migration/mypy/regex_converter.rs @@ -26,7 +26,7 @@ impl Ir { fn into_strings(self) -> Vec { match self { // Part is easy: its string is itself. - Self::Part(s) => vec![s], + Self::Part(s) => vec![s.clone()], // For concat, the components are glued together. // An Alter in this Concat produces multiple strings: // `a(b|c)` -> Concat(a, Alter(b, c)) -> ["ab", "ac"] From bd51b20f2e34352bb0d918c8275fd538afd8e3e0 Mon Sep 17 00:00:00 2001 From: jorenham Date: Wed, 22 Apr 2026 20:45:11 +0200 Subject: [PATCH 2/2] Apply suggestions from code review in `pyrefly_config` Co-authored-by: NathanTempest Co-authored-by: Copilot --- crates/pyrefly_config/src/environment/mod.rs | 1 - crates/pyrefly_config/src/migration/mypy/regex_converter.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/pyrefly_config/src/environment/mod.rs b/crates/pyrefly_config/src/environment/mod.rs index 8134ace5eb..0c06cac38c 100644 --- a/crates/pyrefly_config/src/environment/mod.rs +++ b/crates/pyrefly_config/src/environment/mod.rs @@ -11,7 +11,6 @@ pub(crate) mod conda; clippy::module_inception, reason = "environment is both the module group and public API" )] -#[allow(clippy::module_inception)] pub mod environment; pub(crate) mod finder; pub mod interpreters; diff --git a/crates/pyrefly_config/src/migration/mypy/regex_converter.rs b/crates/pyrefly_config/src/migration/mypy/regex_converter.rs index 6ec68135f6..1df99f1459 100644 --- a/crates/pyrefly_config/src/migration/mypy/regex_converter.rs +++ b/crates/pyrefly_config/src/migration/mypy/regex_converter.rs @@ -26,7 +26,7 @@ impl Ir { fn into_strings(self) -> Vec { match self { // Part is easy: its string is itself. - Self::Part(s) => vec![s.clone()], + Self::Part(s) => vec![s], // For concat, the components are glued together. // An Alter in this Concat produces multiple strings: // `a(b|c)` -> Concat(a, Alter(b, c)) -> ["ab", "ac"]