Skip to content

Commit

Permalink
Add SIM113 lint (#11057)
Browse files Browse the repository at this point in the history
SIM113: Use ``enumerate``
  • Loading branch information
danieleades committed Jan 5, 2023
1 parent 0fbd8af commit c499f66
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion .flake8
Expand Up @@ -11,7 +11,6 @@ ignore =
SIM102,
SIM103,
SIM105,
SIM113,
SIM114,
SIM115,
SIM117,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -172,6 +172,7 @@ external = [ # Whitelist for RUF100 unkown code warnings
"W291",
"W293",
"SIM110",
"SIM113",
]
select = [
"E", # pycodestyle
Expand Down
2 changes: 1 addition & 1 deletion sphinx/jinja2glue.py
Expand Up @@ -68,7 +68,7 @@ def _slice_index(values: list, slices: int) -> Iterator[list]:
count = 0
start = offset
if slices == slice_number + 1: # last column
offset = len(seq)
offset = len(seq) # noqa: SIM113
else:
for value in values[offset:]:
count += 1 + len(value[1][1])
Expand Down

0 comments on commit c499f66

Please sign in to comment.