Skip to content

Commit

Permalink
fix(DRAFT): try reordering maybe_extract_py_scalar overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Feb 13, 2025
1 parent 757c6bd commit b830aa2
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions narwhals/_arrow/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ def maybe_extract_py_scalar(
) -> _AsPyType: ...


@overload
def maybe_extract_py_scalar(
value: pa.Scalar[pa.ListType[_BasicDataType[_AsPyType]]],
return_py_scalar: bool, # noqa: FBT001
) -> list[_AsPyType]: ...


@overload
def maybe_extract_py_scalar(
value: pa.Scalar[pa.StructType],
Expand All @@ -84,11 +77,17 @@ def maybe_extract_py_scalar(


@overload
def maybe_extract_py_scalar(value: pa.Scalar[Any], return_py_scalar: bool) -> Any: ... # noqa: FBT001
def maybe_extract_py_scalar(
value: pa.Scalar[pa.ListType[_BasicDataType[_AsPyType]]],
return_py_scalar: bool, # noqa: FBT001
) -> list[_AsPyType]: ...


@overload
def maybe_extract_py_scalar(value: Any, return_py_scalar: bool) -> Any: ... # noqa: FBT001
def maybe_extract_py_scalar(
value: pa.Scalar[Any] | Any,
return_py_scalar: bool, # noqa: FBT001
) -> Any: ...


def maybe_extract_py_scalar(value: Any, return_py_scalar: bool) -> Any: # noqa: FBT001
Expand Down

0 comments on commit b830aa2

Please sign in to comment.