From fc2a8730a5ba5ca1af9090874ee61e54a1b67ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 23 Jul 2024 12:15:45 +0200 Subject: [PATCH] ci: Make better use of `typos` configuration features (#17800) --- _typos.toml | 51 ++++++++++++++-------------- crates/polars-plan/src/dsl/string.rs | 2 +- py-polars/src/lazyframe/mod.rs | 4 +-- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/_typos.toml b/_typos.toml index 13a1ae4a86aa..ed5f7bde4b64 100644 --- a/_typos.toml +++ b/_typos.toml @@ -1,34 +1,33 @@ -[default] -extend-ignore-identifiers-re = [ - "splitted.*", +[files] +extend-exclude = [ + ".git/", + "*.csv", + "*.gz", + "dists.dss", ] +ignore-hidden = false -[default.extend-identifiers] -bck = "bck" -Fo = "Fo" -ND = "ND" -ba = "ba" -nd = "nd" -opt_nd = "opt_nd" -ANDed = "ANDed" -ody = "ody" +[default] +extend-ignore-re = [ + '"Theatre": \[.+\],', +] [default.extend-words] arange = "arange" -strat = "strat" -'"r0ot"' = "r0ot" -wee = "wee" ser = "ser" -ND = "ND" -ody = "ody" - -[type.csv] -extend-glob = ["*.csv"] -check-file = false +splitted = "splitted" +strat = "strat" -[type.gz] -extend-glob = ["*.gz"] -check-file = false +[type.py.extend-identifiers] +ba = "ba" +ody = "ody" -[files] -extend-exclude = ["_typos.toml", "dists.dss"] +[type.rust.extend-identifiers] +ANDed = "ANDed" +bck = "bck" +Fo = "Fo" +ND = "ND" +nd = "nd" +NDJson = "NDJson" +NDJsonReadOptions = "NDJsonReadOptions" +opt_nd = "opt_nd" diff --git a/crates/polars-plan/src/dsl/string.rs b/crates/polars-plan/src/dsl/string.rs index e03859326662..3346c4413d68 100644 --- a/crates/polars-plan/src/dsl/string.rs +++ b/crates/polars-plan/src/dsl/string.rs @@ -237,7 +237,7 @@ impl StringNameSpace { ) } - /// Find the index of a substring defined by a regular expressons within another string value. + /// Find the index of a substring defined by a regular expressions within another string value. #[cfg(feature = "regex")] pub fn find(self, pat: Expr, strict: bool) -> Expr { self.0.map_many_private( diff --git a/py-polars/src/lazyframe/mod.rs b/py-polars/src/lazyframe/mod.rs index a60839f2f3e7..51ed50c3ae05 100644 --- a/py-polars/src/lazyframe/mod.rs +++ b/py-polars/src/lazyframe/mod.rs @@ -599,12 +599,12 @@ impl PyLazyFrame { Ok((df.into(), time_df.into())) } - fn collect(&self, py: Python, lamdba_post_opt: Option) -> PyResult { + fn collect(&self, py: Python, lambda_post_opt: Option) -> PyResult { // if we don't allow threads and we have udfs trying to acquire the gil from different // threads we deadlock. let df = py.allow_threads(|| { let ldf = self.ldf.clone(); - if let Some(lambda) = lamdba_post_opt { + if let Some(lambda) = lambda_post_opt { ldf._collect_post_opt(|root, lp_arena, expr_arena| { Python::with_gil(|py| { let nt = NodeTraverser::new(