Skip to content

Commit 133e13f

Browse files
committed
some more lint rules
1 parent 9e22ee5 commit 133e13f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mfa/methods/recovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def register_begin(user):
99
secret = pyotp.random_base32()
1010
totp = pyotp.TOTP(secret, digits=10)
1111
code = totp.now()
12-
code = '%s-%s' % (code[:5], code[5:])
12+
code = f'{code[:5]}-{code[5:]}'
1313
state = make_password(code)
1414
return {'code': code}, state
1515

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[tool.ruff]
66
target-version = "py37"
77
exclude = ["migrations"]
8-
select = ["E", "F", "W", "C9", "I", "Q"]
8+
select = ["E", "F", "W", "C9", "I", "Q", "UP", "RUF"]
99

1010
[tool.ruff.flake8-quotes]
1111
inline-quotes = "single"

0 commit comments

Comments
 (0)