Skip to content

Commit f034820

Browse files
[pre-commit.ci] pre-commit autoupdate (#55004)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.285 → v0.0.287](astral-sh/ruff-pre-commit@v0.0.285...v0.0.287) - [github.com/jendrikseipp/vulture: v2.7 → v2.9.1](jendrikseipp/vulture@v2.7...v2.9.1) - [github.com/pylint-dev/pylint: v3.0.0a6 → v3.0.0a7](pylint-dev/pylint@v3.0.0a6...v3.0.0a7) - [github.com/sphinx-contrib/sphinx-lint: v0.6.7 → v0.6.8](sphinx-contrib/sphinx-lint@v0.6.7...v0.6.8) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e30e5f8 commit f034820

File tree

21 files changed

+35
-35
lines changed

21 files changed

+35
-35
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.0.285
27+
rev: v0.0.287
2828
hooks:
2929
- id: ruff
3030
args: [--exit-non-zero-on-fix]
@@ -34,7 +34,7 @@ repos:
3434
alias: ruff-selected-autofixes
3535
args: [--select, "ANN001,ANN204", --fix-only, --exit-non-zero-on-fix]
3636
- repo: https://github.com/jendrikseipp/vulture
37-
rev: 'v2.7'
37+
rev: 'v2.9.1'
3838
hooks:
3939
- id: vulture
4040
entry: python scripts/run_vulture.py
@@ -84,7 +84,7 @@ repos:
8484
'--filter=-readability/casting,-runtime/int,-build/include_subdir,-readability/fn_size'
8585
]
8686
- repo: https://github.com/pylint-dev/pylint
87-
rev: v3.0.0a6
87+
rev: v3.0.0a7
8888
hooks:
8989
- id: pylint
9090
stages: [manual]
@@ -124,7 +124,7 @@ repos:
124124
types: [text] # overwrite types: [rst]
125125
types_or: [python, rst]
126126
- repo: https://github.com/sphinx-contrib/sphinx-lint
127-
rev: v0.6.7
127+
rev: v0.6.8
128128
hooks:
129129
- id: sphinx-lint
130130
- repo: local

asv_bench/benchmarks/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def time_setitem(self, multiple_chunks):
9090
self.array[i] = "foo"
9191

9292
def time_setitem_list(self, multiple_chunks):
93-
indexer = list(range(0, 50)) + list(range(-1000, 0, 50))
93+
indexer = list(range(50)) + list(range(-1000, 0, 50))
9494
self.array[indexer] = ["foo"] * len(indexer)
9595

9696
def time_setitem_slice(self, multiple_chunks):

asv_bench/benchmarks/join_merge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,14 @@ class MergeCategoricals:
360360
def setup(self):
361361
self.left_object = DataFrame(
362362
{
363-
"X": np.random.choice(range(0, 10), size=(10000,)),
363+
"X": np.random.choice(range(10), size=(10000,)),
364364
"Y": np.random.choice(["one", "two", "three"], size=(10000,)),
365365
}
366366
)
367367

368368
self.right_object = DataFrame(
369369
{
370-
"X": np.random.choice(range(0, 10), size=(10000,)),
370+
"X": np.random.choice(range(10), size=(10000,)),
371371
"Z": np.random.choice(["jjj", "kkk", "sss"], size=(10000,)),
372372
}
373373
)

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
from collections.abc import MutableMapping
7171
from datetime import tzinfo
7272

73-
import pyarrow as pa # noqa: F811, TCH004
73+
import pyarrow as pa # noqa: TCH004
7474

7575
from pandas._typing import (
7676
Dtype,

pandas/core/indexes/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,5 +377,5 @@ def all_indexes_same(indexes) -> bool:
377377

378378

379379
def default_index(n: int) -> RangeIndex:
380-
rng = range(0, n)
380+
rng = range(n)
381381
return RangeIndex._simple_new(rng, name=None)

pandas/tests/frame/methods/test_copy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_copy_consolidates(self):
5656
}
5757
)
5858

59-
for i in range(0, 10):
59+
for i in range(10):
6060
df.loc[:, f"n_{i}"] = np.random.default_rng(2).integers(0, 100, size=55)
6161

6262
assert len(df._mgr.blocks) == 11

pandas/tests/frame/methods/test_reset_index.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,15 +788,15 @@ def test_errorreset_index_rename(float_frame):
788788

789789

790790
def test_reset_index_false_index_name():
791-
result_series = Series(data=range(5, 10), index=range(0, 5))
791+
result_series = Series(data=range(5, 10), index=range(5))
792792
result_series.index.name = False
793793
result_series.reset_index()
794-
expected_series = Series(range(5, 10), RangeIndex(range(0, 5), name=False))
794+
expected_series = Series(range(5, 10), RangeIndex(range(5), name=False))
795795
tm.assert_series_equal(result_series, expected_series)
796796

797797
# GH 38147
798-
result_frame = DataFrame(data=range(5, 10), index=range(0, 5))
798+
result_frame = DataFrame(data=range(5, 10), index=range(5))
799799
result_frame.index.name = False
800800
result_frame.reset_index()
801-
expected_frame = DataFrame(range(5, 10), RangeIndex(range(0, 5), name=False))
801+
expected_frame = DataFrame(range(5, 10), RangeIndex(range(5), name=False))
802802
tm.assert_frame_equal(result_frame, expected_frame)

pandas/tests/frame/methods/test_sort_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ def test_sort_index_multiindex_sparse_column(self):
911911
expected = DataFrame(
912912
{
913913
i: pd.array([0.0, 0.0, 0.0, 0.0], dtype=pd.SparseDtype("float64", 0.0))
914-
for i in range(0, 4)
914+
for i in range(4)
915915
},
916916
index=MultiIndex.from_product([[1, 2], [1, 2]]),
917917
)

pandas/tests/frame/test_constructors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,12 +692,12 @@ def test_constructor_error_msgs(self):
692692
arr = np.array([[4, 5, 6]])
693693
msg = r"Shape of passed values is \(1, 3\), indices imply \(1, 4\)"
694694
with pytest.raises(ValueError, match=msg):
695-
DataFrame(index=[0], columns=range(0, 4), data=arr)
695+
DataFrame(index=[0], columns=range(4), data=arr)
696696

697697
arr = np.array([4, 5, 6])
698698
msg = r"Shape of passed values is \(3, 1\), indices imply \(1, 4\)"
699699
with pytest.raises(ValueError, match=msg):
700-
DataFrame(index=[0], columns=range(0, 4), data=arr)
700+
DataFrame(index=[0], columns=range(4), data=arr)
701701

702702
# higher dim raise exception
703703
with pytest.raises(ValueError, match="Must pass 2-d input"):
@@ -2391,7 +2391,7 @@ def test_construct_with_two_categoricalindex_series(self):
23912391

23922392
def test_constructor_series_nonexact_categoricalindex(self):
23932393
# GH 42424
2394-
ser = Series(range(0, 100))
2394+
ser = Series(range(100))
23952395
ser1 = cut(ser, 10).value_counts().head(5)
23962396
ser2 = cut(ser, 10).value_counts().tail(5)
23972397
result = DataFrame({"1": ser1, "2": ser2})

pandas/tests/groupby/test_groupby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ def test_pivot_table_values_key_error():
19281928
df = DataFrame(
19291929
{
19301930
"eventDate": date_range(datetime.today(), periods=20, freq="M").tolist(),
1931-
"thename": range(0, 20),
1931+
"thename": range(20),
19321932
}
19331933
)
19341934

0 commit comments

Comments
 (0)