Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Jul 8, 2024
1 parent 4cbcee8 commit 3d53288
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions narwhals/_expression_parsing.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Utilities for expression parsing
# Useful for backends which don't have any concept of expressions, such
# and pandas or PyArrow.

# The type annotations can definitely be improved here, there quite a few
# internal type: ignores. But, the signatures should be correct.
from __future__ import annotations

from copy import copy
Expand Down Expand Up @@ -93,7 +90,7 @@ def maybe_evaluate_expr(
) -> ListOfCompliantSeries | T:
"""Evaluate `expr` if it's an expression, otherwise return it as is."""
if hasattr(expr, "__narwhals_expr__"):
expr = cast(CompliantExpr, expr)
expr = cast("CompliantExpr", expr)
return expr._call(df) # type: ignore[arg-type]
return expr

Expand Down

0 comments on commit 3d53288

Please sign in to comment.