Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions narwhals/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand Down
2 changes: 1 addition & 1 deletion tests/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Loading