Skip to content

Commit c499f66

Browse files
authored
Add SIM113 lint (#11057)
SIM113: Use ``enumerate``
1 parent 0fbd8af commit c499f66

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

.flake8

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ignore =
1111
SIM102,
1212
SIM103,
1313
SIM105,
14-
SIM113,
1514
SIM114,
1615
SIM115,
1716
SIM117,

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ external = [ # Whitelist for RUF100 unkown code warnings
172172
"W291",
173173
"W293",
174174
"SIM110",
175+
"SIM113",
175176
]
176177
select = [
177178
"E", # pycodestyle

sphinx/jinja2glue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def _slice_index(values: list, slices: int) -> Iterator[list]:
6868
count = 0
6969
start = offset
7070
if slices == slice_number + 1: # last column
71-
offset = len(seq)
71+
offset = len(seq) # noqa: SIM113
7272
else:
7373
for value in values[offset:]:
7474
count += 1 + len(value[1][1])

0 commit comments

Comments
 (0)