Skip to content

Commit b621ea3

Browse files
🎨 Auto format
1 parent 1d23024 commit b621ea3

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

backend/app/core/security.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
from app.core.config import settings
1010

11-
password_hash = PasswordHash((
12-
Argon2Hasher(),
13-
BcryptHasher(),
14-
))
11+
password_hash = PasswordHash(
12+
(
13+
Argon2Hasher(),
14+
BcryptHasher(),
15+
)
16+
)
1517

1618

1719
ALGORITHM = "HS256"
@@ -24,7 +26,9 @@ def create_access_token(subject: str | Any, expires_delta: timedelta) -> str:
2426
return encoded_jwt
2527

2628

27-
def verify_password(plain_password: str, hashed_password: str) -> tuple[bool, str | None]:
29+
def verify_password(
30+
plain_password: str, hashed_password: str
31+
) -> tuple[bool, str | None]:
2832
return password_hash.verify_and_update(plain_password, hashed_password)
2933

3034

backend/tests/api/routes/test_users.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ def test_update_password_me(
258258
db.refresh(user_db)
259259

260260
assert r.status_code == 200
261-
verified, _ = verify_password(settings.FIRST_SUPERUSER_PASSWORD, user_db.hashed_password)
261+
verified, _ = verify_password(
262+
settings.FIRST_SUPERUSER_PASSWORD, user_db.hashed_password
263+
)
262264
assert verified
263265

264266

backend/tests/crud/test_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from sqlmodel import Session
44

55
from app import crud
6-
from app.core.security import get_password_hash, verify_password
6+
from app.core.security import verify_password
77
from app.models import User, UserCreate, UserUpdate
88
from tests.utils.utils import random_email, random_lower_string
99

0 commit comments

Comments
 (0)