Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SIM113 lint #11057

Merged
merged 1 commit into from Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .flake8
Expand Up @@ -13,7 +13,6 @@ ignore =
SIM102,
SIM103,
SIM105,
SIM113,
SIM114,
SIM115,
SIM117,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -169,6 +169,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