From c81d45ef3c28140dc775108468014a772641bfea Mon Sep 17 00:00:00 2001 From: FBruzzesi Date: Mon, 15 Jul 2024 14:57:13 +0200 Subject: [PATCH] not covering --- narwhals/_arrow/group_by.py | 6 +++--- narwhals/_expression_parsing.py | 4 ++-- narwhals/_pandas_like/group_by.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/narwhals/_arrow/group_by.py b/narwhals/_arrow/group_by.py index f232bcd56..117616b00 100644 --- a/narwhals/_arrow/group_by.py +++ b/narwhals/_arrow/group_by.py @@ -72,13 +72,13 @@ def agg_arrow( simple_aggregations: dict[str, tuple[str, str]] = {} for expr in exprs: # e.g. agg(nw.mean('a')) # noqa: ERA001 - if expr._depth != 1: + if expr._depth != 1: # pragma: no cover msg = f"Expr._depth should be 1, found {expr._depth}" raise ValueError(msg) - if expr._root_names is None: + if expr._root_names is None: # pragma: no cover msg = "`Expr._root_names` cannot be None" raise ValueError(msg) - if expr._output_names is None: + if expr._output_names is None: # pragma: no cover msg = "`Expr._output_names` cannot be None" raise ValueError(msg) diff --git a/narwhals/_expression_parsing.py b/narwhals/_expression_parsing.py index deb3a5a79..24855d4d9 100644 --- a/narwhals/_expression_parsing.py +++ b/narwhals/_expression_parsing.py @@ -191,7 +191,7 @@ def func(df: CompliantDataFrame) -> list[CompliantSeries]: out.append(_out) if expr._output_names is not None and ( [s.name for s in out] != expr._output_names - ): + ): # pragma: no cover msg = "Found invalid series name" raise ValueError(msg) return out @@ -217,7 +217,7 @@ def func(df: CompliantDataFrame) -> list[CompliantSeries]: if not ( (output_names is None and root_names is None) or (output_names is not None and root_names is not None) - ): + ): # pragma: no cover msg = "output_names and root_names are incompatible" raise ValueError(msg) diff --git a/narwhals/_pandas_like/group_by.py b/narwhals/_pandas_like/group_by.py index 8950f64df..0ce54ad48 100644 --- a/narwhals/_pandas_like/group_by.py +++ b/narwhals/_pandas_like/group_by.py @@ -131,13 +131,13 @@ def agg_pandas( # noqa: PLR0915 continue # e.g. agg(nw.mean('a')) # noqa: ERA001 - if expr._depth != 1: + if expr._depth != 1: # pragma: no cover msg = f"Expr._depth should be 1, found {expr._depth}" raise ValueError(msg) - if expr._root_names is None: + if expr._root_names is None: # pragma: no cover msg = "`Expr._root_names` cannot be None" raise ValueError(msg) - if expr._output_names is None: + if expr._output_names is None: # pragma: no cover msg = "`Expr._output_names` cannot be None" raise ValueError(msg)