Pylint cleanups (#35409)
* Avoid some outer name redefinitions * Remove unneeded directives * Narrow directive scope * Don't disable redefined-variable-type
This commit is contained in:
parent
c37100299a
commit
b4404b071f
13 changed files with 26 additions and 35 deletions
|
@ -138,8 +138,9 @@ class Data:
|
|||
if not bcrypt.checkpw(password.encode(), user_hash):
|
||||
raise InvalidAuth
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
def hash_password(self, password: str, for_storage: bool = False) -> bytes:
|
||||
def hash_password( # pylint: disable=no-self-use
|
||||
self, password: str, for_storage: bool = False
|
||||
) -> bytes:
|
||||
"""Encode a password."""
|
||||
hashed: bytes = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue