Skip to content

Commit

Permalink
not covering
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Jul 15, 2024
1 parent 130d514 commit c81d45e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions narwhals/_arrow/group_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions narwhals/_expression_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions narwhals/_pandas_like/group_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c81d45e

Please sign in to comment.