enable test typechecking for a bunch of django test suite folders

This commit is contained in:
Maxim Kurnikov
2019-01-30 15:56:59 +03:00
parent 978379c454
commit 628c1224d6
24 changed files with 229 additions and 141 deletions

View File

@@ -1,4 +1,3 @@
from collections import OrderedDict
from typing import Any, Callable, Dict, List, Optional
UNUSABLE_PASSWORD_PREFIX: str
@@ -17,92 +16,30 @@ def identify_hasher(encoded: str) -> BasePasswordHasher: ...
def mask_hash(hash: str, show: int = ..., char: str = ...) -> str: ...
class BasePasswordHasher:
algorithm: Any = ...
library: Any = ...
algorithm: str = ...
library: str = ...
rounds: int = ...
time_cost: int = ...
memory_cost: int = ...
parallelism: int = ...
digest: Any = ...
iterations: Optional[int] = ...
def salt(self) -> str: ...
def verify(self, password: str, encoded: str) -> Any: ...
def verify(self, password: str, encoded: str) -> bool: ...
def encode(self, password: str, salt: str) -> Any: ...
def safe_summary(self, encoded: str) -> Any: ...
def must_update(self, encoded: str) -> bool: ...
def harden_runtime(self, password: str, encoded: str) -> None: ...
class PBKDF2PasswordHasher(BasePasswordHasher):
algorithm: str = ...
iterations: int = ...
digest: Any = ...
def encode(self, password: str, salt: str, iterations: Optional[int] = ...) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: str) -> OrderedDict: ...
def must_update(self, encoded: str) -> bool: ...
def harden_runtime(self, password: str, encoded: str) -> None: ...
class PBKDF2SHA1PasswordHasher(PBKDF2PasswordHasher):
algorithm: str = ...
digest: Any = ...
class Argon2PasswordHasher(BasePasswordHasher):
algorithm: str = ...
library: str = ...
time_cost: int = ...
memory_cost: int = ...
parallelism: int = ...
def encode(self, password: Any, salt: Any): ...
def verify(self, password: Any, encoded: Any): ...
def safe_summary(self, encoded: Any): ...
def must_update(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class BCryptSHA256PasswordHasher(BasePasswordHasher):
algorithm: str = ...
digest: Any = ...
library: Any = ...
rounds: int = ...
def salt(self): ...
def encode(self, password: Any, salt: Any): ...
def verify(self, password: Any, encoded: Any): ...
def safe_summary(self, encoded: Any): ...
def must_update(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class BCryptPasswordHasher(BCryptSHA256PasswordHasher):
algorithm: str = ...
digest: Any = ...
class SHA1PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class MD5PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: str) -> OrderedDict: ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class UnsaltedSHA1PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def salt(self) -> str: ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class UnsaltedMD5PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def salt(self) -> str: ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class CryptPasswordHasher(BasePasswordHasher):
algorithm: str = ...
library: str = ...
def salt(self): ...
def encode(self, password: Any, salt: Any): ...
def verify(self, password: Any, encoded: Any): ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class PBKDF2SHA1PasswordHasher(PBKDF2PasswordHasher): ...
class Argon2PasswordHasher(BasePasswordHasher): ...
class BCryptSHA256PasswordHasher(BasePasswordHasher): ...
class BCryptPasswordHasher(BCryptSHA256PasswordHasher): ...
class SHA1PasswordHasher(BasePasswordHasher): ...
class MD5PasswordHasher(BasePasswordHasher): ...
class UnsaltedSHA1PasswordHasher(BasePasswordHasher): ...
class UnsaltedMD5PasswordHasher(BasePasswordHasher): ...
class CryptPasswordHasher(BasePasswordHasher): ...