Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ repos:
- id: django-upgrade
args: [--target-version, "3.2"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.15.22"
rev: "v0.16.2"
hooks:
- id: ruff
args: [--unsafe-fixes]
- id: ruff-format
- repo: https://github.com/biomejs/pre-commit
rev: "v2.5.4"
rev: "v2.5.7"
hooks:
- id: biome-check
args: [--unsafe]
verbose: true
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.25.3
rev: v2.27.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
Expand Down
2 changes: 1 addition & 1 deletion authlib/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _role_has_perm(self, *, perm, obj):
cls._role_has_perm = _role_has_perm

def deconstruct(self):
name, path, args, kwargs = super().deconstruct()
name, _path, args, kwargs = super().deconstruct()
kwargs["choices"] = [("", "")]
return name, "django.db.models.CharField", args, kwargs

Expand Down
2 changes: 1 addition & 1 deletion authlib/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def email_registration(

else:
try:
email, payload = decode(code, max_age=max_age)
email, _payload = decode(code, max_age=max_age)
except ValidationError as exc:
[messages.error(request, msg) for msg in exc.messages]
return redirect("../")
Expand Down
6 changes: 3 additions & 3 deletions tests/testapp/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_registration(self):

self.assertEqual(len(mail.outbox), 1)
body = mail.outbox[0].body
url = unquote([line for line in body.splitlines() if "testserver" in line][0])
url = unquote(next(line for line in body.splitlines() if "testserver" in line))

self.assertTrue("http://testserver/email/dGVzdEBleGFtcGxlLmNvbTo:" in url)

Expand Down Expand Up @@ -66,7 +66,7 @@ def test_existing_user(self):

self.assertEqual(len(mail.outbox), 1)
body = mail.outbox[0].body
url = unquote([line for line in body.splitlines() if "testserver" in line][0])
url = unquote(next(line for line in body.splitlines() if "testserver" in line))

self.assertTrue(
re.match(r"http://testserver/email/dGVzdEBleGFtcGxlLmNvbTo:", url)
Expand Down Expand Up @@ -104,7 +104,7 @@ def test_payload(self):

self.assertEqual(len(mail.outbox), 1)
body = mail.outbox[0].body
url = unquote([line for line in body.splitlines() if "testserver" in line][0])
url = unquote(next(line for line in body.splitlines() if "testserver" in line))

response = self.client.get(url)
self.assertEqual(
Expand Down