From 86983110abcec16194a8018a4ca11d0ca7d62898 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 8 Feb 2025 17:55:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- narwhals/_duckdb/expr_str.py | 2 +- narwhals/_pandas_like/utils.py | 1 - tests/hypothesis/getitem_test.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/narwhals/_duckdb/expr_str.py b/narwhals/_duckdb/expr_str.py index aed5e4529..0accf34ff 100644 --- a/narwhals/_duckdb/expr_str.py +++ b/narwhals/_duckdb/expr_str.py @@ -54,7 +54,7 @@ def func(_input: duckdb.Expression) -> duckdb.Expression: _input, ConstantExpression(offset + 1) if offset >= 0 - else FunctionExpression("length", _input) + offset + 1, # type: ignore[operator] + else FunctionExpression("length", _input) + offset + 1, # type: ignore[operator] FunctionExpression("length", _input) if length is None else ConstantExpression(length) + offset, # type: ignore[operator] diff --git a/narwhals/_pandas_like/utils.py b/narwhals/_pandas_like/utils.py index ab1a11423..7260baaac 100644 --- a/narwhals/_pandas_like/utils.py +++ b/narwhals/_pandas_like/utils.py @@ -23,7 +23,6 @@ T = TypeVar("T") if TYPE_CHECKING: - import numpy as np from pandas._typing import Dtype as PandasDtype diff --git a/tests/hypothesis/getitem_test.py b/tests/hypothesis/getitem_test.py index 6c227ba96..f6cfd4589 100644 --- a/tests/hypothesis/getitem_test.py +++ b/tests/hypothesis/getitem_test.py @@ -102,7 +102,7 @@ def tuple_selector(draw: st.DrawFn) -> tuple[Any, Any]: ), st.slices(TEST_DATA_NUM_ROWS), arrays( - dtype=st.sampled_from([np.int8, np.int16, np.int32, np.int64]), # type: ignore[arg-type] + dtype=st.sampled_from([np.int8, np.int16, np.int32, np.int64]), # type: ignore[arg-type] shape=st.integers(min_value=0, max_value=10), elements=st.integers( min_value=0, # pyarrow does not support negative indexing