Skip to content

Commit e24a8e9

Browse files
committed
Minor beautifications
1 parent 9551441 commit e24a8e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pubsub/pubsub.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ def search(phrase: str, limit: Optional[int] = None) -> List[Post]:
7474
def hash_password(password: str, salt: Optional[bytes] = None) -> HashAndSalt:
7575
pepper = b'alchemists discovered that gold came from earth air fire and water'
7676
salt = salt or secrets.token_bytes(16)
77-
return hashlib.pbkdf2_hmac('sha512', password.encode(), salt+pepper, 100000), salt
77+
return hashlib.pbkdf2_hmac('sha512', password.encode(), salt+pepper, 100_000), salt
7878

79-
def set_user(user: User, displayname: str, email: str, password: str, bio: Optional[str]=None, photo: Optional[str]=None) -> None:
79+
def set_user(user: User, displayname: str, email: str, password: str,
80+
bio: Optional[str]=None, photo: Optional[str]=None) -> None:
8081
user = intern(user)
8182
hashed_password = hash_password(password)
8283
user_info[user] = UserInfo(displayname, email, hashed_password, bio, photo)

0 commit comments

Comments
 (0)