Add SIM113 lint (#11057)

SIM113: Use ``enumerate``
This commit is contained in:
danieleades 2023-01-05 11:45:29 +00:00 committed by GitHub
parent 0fbd8afc05
commit c499f66012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,6 @@ ignore =
SIM102,
SIM103,
SIM105,
SIM113,
SIM114,
SIM115,
SIM117,

View File

@ -172,6 +172,7 @@ external = [ # Whitelist for RUF100 unkown code warnings
"W291",
"W293",
"SIM110",
"SIM113",
]
select = [
"E", # pycodestyle

View File

@ -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])