Skip to content

Commit

Permalink
Use ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Feb 5, 2024
1 parent e679484 commit 57a0368
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tests = [
"tox",
]
linting = [
"flake8<=6.99",
"ruff",
"isort<=5.99",
]

Expand All @@ -70,6 +70,23 @@ Homepage = "https://github.com/jazzband/django-two-factor-auth"
Documentation = "https://django-two-factor-auth.readthedocs.io/en/stable/"
Changelog = "https://github.com/jazzband/django-two-factor-auth/blob/master/CHANGELOG.md"

[tool.ruff]
line-length = 119
target-version = "py38"
extend-exclude = ["docs"]

[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle (Error)
"W", # pycodestyle (Warning)
# "I", # isort (waiting for https://github.com/astral-sh/ruff/issues/2600)
]

# [tool.ruff.lint.isort]
# combine-as-imports = true
# known-first-party = ["two_factor"]

[tool.isort]
combine_as_imports = true
default_section = "THIRDPARTY"
Expand Down
11 changes: 11 additions & 0 deletions two_factor/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@
)
from .mixins import OTPRequiredMixin
from .profile import DisableView, ProfileView

__all__ = (
"BackupTokensView",
"LoginView",
"QRGeneratorView",
"SetupCompleteView",
"SetupView",
"OTPRequiredMixin",
"DisableView",
"ProfileView"
)

0 comments on commit 57a0368

Please sign in to comment.