diff --git a/narwhals/utils.py b/narwhals/utils.py index 0fa1f312fc..8512c79afe 100644 --- a/narwhals/utils.py +++ b/narwhals/utils.py @@ -984,9 +984,9 @@ def _has_default_index( index = native_frame_or_series.index return ( _is_range_index(index, native_namespace) - and index.start == 0 # type: ignore[comparison-overlap] - and index.stop == len(index) # type: ignore[comparison-overlap] - and index.step == 1 # type: ignore[comparison-overlap] + and index.start == 0 + and index.stop == len(index) + and index.step == 1 ) diff --git a/tests/utils_test.py b/tests/utils_test.py index b0494a046a..93ab14b9b4 100644 --- a/tests/utils_test.py +++ b/tests/utils_test.py @@ -140,7 +140,7 @@ def test_maybe_set_index_pandas_direct_index( native_df_or_series.index = pandas_index # type: ignore[assignment] assert_series_equal(nw.to_native(result), native_df_or_series) else: - expected = native_df_or_series.set_index(pandas_index) # type: ignore[type-var] + expected = native_df_or_series.set_index(pandas_index) # type: ignore[arg-type] assert_frame_equal(nw.to_native(result), expected)