Skip to content

Commit

Permalink
Updated ruff settings
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Jan 25, 2025
1 parent b31df3c commit eb63978
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docs:
$(MAKE) -C docs clean html

test:
@ruff .
@ruff check .
@isort --check-only --diff formtools tests
@ python -W error::DeprecationWarning -W error::PendingDeprecationWarning -m coverage run `which django-admin` test tests
@coverage report
Expand Down
4 changes: 2 additions & 2 deletions formtools/wizard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def get(self, *args, **kwargs):
"""
This renders the form or, if needed, does the http redirects.
"""
step_url = kwargs.get('step', None)
step_url = kwargs.get('step')
if step_url is None:
if 'reset' in self.request.GET:
self.storage.reset()
Expand Down Expand Up @@ -745,7 +745,7 @@ def render_done(self, form, **kwargs):
When rendering the done view, we have to redirect first (if the URL
name doesn't fit).
"""
if kwargs.get('step', None) != self.done_step_name:
if kwargs.get('step') != self.done_step_name:
return redirect(self.get_step_url(self.done_step_name))
return super().render_done(form, **kwargs)

Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ multi_line_output = 5

[tool.ruff]
line-length = 119

[tool.ruff.lint]
select = ["ASYNC", "C4", "C90", "DJ", "DTZ", "E", "F", "N", "PERF", "PL", "SIM", "UP", "W"]
ignore = ["UP031"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"formtools/wizard/storage/base.py" = ["PLW2901"]
"formtools/wizard/views.py" = ["N805", "PLW2901"]
"tests/wizard/storage.py" = ["DTZ005"]
Expand Down

0 comments on commit eb63978

Please sign in to comment.