style: apply ruff formatting to new files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Johan Lundberg 2026-03-31 15:36:08 +02:00
parent a65af90320
commit d7cdedbd5f
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1
6 changed files with 6 additions and 20 deletions

View file

@ -5,7 +5,6 @@ from httpx import AsyncClient
from porchlight.authn.password import PasswordHasher, PasswordService
from porchlight.models import PasswordCredential, User
from tests.conftest import get_csrf_token
@ -34,9 +33,7 @@ async def _setup_admin_and_target(client: AsyncClient) -> tuple[str, str]:
await user_repo.create(target)
svc = PasswordService(hasher=PasswordHasher(time_cost=1, memory_cost=8192))
await cred_repo.create_password(
PasswordCredential(user_id=admin.userid, password_hash=svc.hash("AdminPass123!"))
)
await cred_repo.create_password(PasswordCredential(user_id=admin.userid, password_hash=svc.hash("AdminPass123!")))
token = await get_csrf_token(client)
await client.post(

View file

@ -5,7 +5,6 @@ from httpx import AsyncClient
from porchlight.authn.password import PasswordHasher, PasswordService
from porchlight.models import PasswordCredential, User
from tests.conftest import get_csrf_token
@ -25,9 +24,7 @@ async def _login_admin(client: AsyncClient) -> str:
await user_repo.create(user)
svc = PasswordService(hasher=PasswordHasher(time_cost=1, memory_cost=8192))
await cred_repo.create_password(
PasswordCredential(user_id=user.userid, password_hash=svc.hash("AdminPass123!"))
)
await cred_repo.create_password(PasswordCredential(user_id=user.userid, password_hash=svc.hash("AdminPass123!")))
token = await get_csrf_token(client)
await client.post(

View file

@ -5,7 +5,6 @@ from httpx import AsyncClient
from porchlight.authn.password import PasswordHasher, PasswordService
from porchlight.models import PasswordCredential, User
from tests.conftest import get_csrf_token
@ -60,9 +59,7 @@ async def test_inactive_user_cannot_register_magic_link(client: AsyncClient) ->
)
await user_repo.create(user)
link = await magic_link_service.create(
username="deactivated", created_by="admin", note="test"
)
link = await magic_link_service.create(username="deactivated", created_by="admin", note="test")
response = await client.get(f"/register/{link.token}", follow_redirects=False)

View file

@ -5,7 +5,6 @@ from httpx import AsyncClient
from porchlight.authn.password import PasswordHasher, PasswordService
from porchlight.models import PasswordCredential, User
from tests.conftest import get_csrf_token
@ -24,9 +23,7 @@ async def _login_user_with_password(client: AsyncClient) -> str:
await user_repo.create(user)
svc = PasswordService(hasher=PasswordHasher(time_cost=1, memory_cost=8192))
await cred_repo.create_password(
PasswordCredential(user_id=user.userid, password_hash=svc.hash("OldPass123!ok"))
)
await cred_repo.create_password(PasswordCredential(user_id=user.userid, password_hash=svc.hash("OldPass123!ok")))
token = await get_csrf_token(client)
await client.post(