Skip to content

Commit 4fcc352

Browse files
DimitriPapadopoulosFrancescAlted
authored andcommitted
Apply ruff/bugbear rule
B007 Loop control variable `i` not used within loop body
1 parent 7b7ba2e commit 4fcc352

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,3 @@ extend-select = [
5858
"I",
5959
"UP",
6060
]
61-
ignore = [
62-
"B007",
63-
]

tests/test_schunk_delete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_schunk_delete_numpy(contiguous, urlpath, nchunks, ndeletes):
4040
nchunks_ = schunk.append_data(buffer)
4141
assert nchunks_ == (i + 1)
4242

43-
for i in range(ndeletes):
43+
for _ in range(ndeletes):
4444
pos = random.randint(0, nchunks - 1)
4545
if pos != (nchunks - 1):
4646
buff = schunk.decompress_chunk(pos + 1)
@@ -84,7 +84,7 @@ def test_schunk_delete(contiguous, urlpath, nchunks, ndeletes):
8484
nchunks_ = schunk.append_data(bytes_obj)
8585
assert nchunks_ == (i + 1)
8686

87-
for i in range(ndeletes):
87+
for _ in range(ndeletes):
8888
pos = random.randint(0, nchunks - 1)
8989
if pos != (nchunks - 1):
9090
buff = schunk.decompress_chunk(pos + 1)

tests/test_schunk_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_schunk_update_numpy(contiguous, urlpath, nchunks, nupdates, copy, creat
4343
nchunks_ = schunk.append_data(buffer)
4444
assert nchunks_ == (i + 1)
4545

46-
for i in range(nupdates):
46+
for _ in range(nupdates):
4747
pos = random.randint(0, nchunks - 1)
4848
buffer = pos * np.arange(200 * 1000, dtype="int32")
4949
if create_chunk:
@@ -95,7 +95,7 @@ def test_update(contiguous, urlpath, nchunks, nupdates, copy, create_chunk, gil)
9595
nchunks_ = schunk.append_data(bytes_obj)
9696
assert nchunks_ == (i + 1)
9797

98-
for i in range(nupdates):
98+
for _ in range(nupdates):
9999
pos = random.randint(0, nchunks - 1)
100100
bytes_obj = b"i " * nbytes
101101
if create_chunk:

0 commit comments

Comments
 (0)