mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 10:52:31 +08:00
Replace Incomplete | None = None in third party stubs (#14063)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, StrOrBytesPath, SupportsItems
|
||||
from _typeshed import StrOrBytesPath, SupportsItems
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
@@ -16,14 +16,14 @@ class CryptPolicy:
|
||||
def has_schemes(self): ...
|
||||
def iter_handlers(self): ...
|
||||
def schemes(self, resolve: bool = False): ...
|
||||
def get_handler(self, name: Incomplete | None = None, category: Incomplete | None = None, required: bool = False): ...
|
||||
def get_min_verify_time(self, category: Incomplete | None = None): ...
|
||||
def get_options(self, name, category: Incomplete | None = None): ...
|
||||
def handler_is_deprecated(self, name, category: Incomplete | None = None): ...
|
||||
def get_handler(self, name=None, category=None, required: bool = False): ...
|
||||
def get_min_verify_time(self, category=None): ...
|
||||
def get_options(self, name, category=None): ...
|
||||
def handler_is_deprecated(self, name, category=None): ...
|
||||
def iter_config(self, ini: bool = False, resolve: bool = False): ...
|
||||
def to_dict(self, resolve: bool = False): ...
|
||||
def to_file(self, stream, section: str = "passlib") -> None: ...
|
||||
def to_string(self, section: str = "passlib", encoding: Incomplete | None = None): ...
|
||||
def to_string(self, section: str = "passlib", encoding=None): ...
|
||||
|
||||
class CryptContext:
|
||||
@classmethod
|
||||
@@ -33,7 +33,7 @@ class CryptContext:
|
||||
def copy(self, **kwds: Any) -> CryptContext: ...
|
||||
def using(self, **kwds: Any) -> CryptContext: ...
|
||||
def replace(self, **kwds): ...
|
||||
def __init__(self, schemes: Incomplete | None = None, policy=..., _autoload: bool = True, **kwds) -> None: ...
|
||||
def __init__(self, schemes=None, policy=..., _autoload: bool = True, **kwds) -> None: ...
|
||||
policy: CryptPolicy
|
||||
def load_path(
|
||||
self, path: StrOrBytesPath, update: bool = False, section: str = "passlib", encoding: str = "utf-8"
|
||||
@@ -46,9 +46,9 @@ class CryptContext:
|
||||
encoding: str = "utf-8",
|
||||
) -> None: ...
|
||||
def update(self, *args: Any, **kwds: Any) -> None: ...
|
||||
def schemes(self, resolve: bool = False, category: Incomplete | None = None, unconfigured: bool = False): ...
|
||||
def default_scheme(self, category: Incomplete | None = None, resolve: bool = False, unconfigured: bool = False): ...
|
||||
def handler(self, scheme: Incomplete | None = None, category: Incomplete | None = None, unconfigured: bool = False): ...
|
||||
def schemes(self, resolve: bool = False, category=None, unconfigured: bool = False): ...
|
||||
def default_scheme(self, category=None, resolve: bool = False, unconfigured: bool = False): ...
|
||||
def handler(self, scheme=None, category=None, unconfigured: bool = False): ...
|
||||
@property
|
||||
def context_kwds(self): ...
|
||||
def to_dict(self, resolve: bool = False) -> dict[str, Any]: ...
|
||||
@@ -63,12 +63,10 @@ class CryptContext:
|
||||
def needs_update(
|
||||
self, hash: str | bytes, scheme: str | None = None, category: str | None = None, secret: str | bytes | None = None
|
||||
) -> bool: ...
|
||||
def hash_needs_update(self, hash, scheme: Incomplete | None = None, category: Incomplete | None = None): ...
|
||||
def genconfig(self, scheme: Incomplete | None = None, category: Incomplete | None = None, **settings): ...
|
||||
def genhash(self, secret, config, scheme: Incomplete | None = None, category: Incomplete | None = None, **kwds): ...
|
||||
def identify(
|
||||
self, hash, category: Incomplete | None = None, resolve: bool = False, required: bool = False, unconfigured: bool = False
|
||||
): ...
|
||||
def hash_needs_update(self, hash, scheme=None, category=None): ...
|
||||
def genconfig(self, scheme=None, category=None, **settings): ...
|
||||
def genhash(self, secret, config, scheme=None, category=None, **kwds): ...
|
||||
def identify(self, hash, category=None, resolve: bool = False, required: bool = False, unconfigured: bool = False): ...
|
||||
def hash(self, secret: str | bytes, scheme: str | None = None, category: str | None = None, **kwds: Any) -> str: ...
|
||||
def encrypt(self, *args, **kwds): ...
|
||||
def verify(
|
||||
@@ -83,7 +81,7 @@ class CryptContext:
|
||||
def enable(self, hash: str | bytes) -> str: ...
|
||||
|
||||
class LazyCryptContext(CryptContext):
|
||||
def __init__(self, schemes: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, schemes=None, **kwds) -> None: ...
|
||||
def __getattribute__(self, attr: str) -> Any: ...
|
||||
|
||||
__all__ = ["CryptContext", "LazyCryptContext", "CryptPolicy"]
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class md4:
|
||||
name: str
|
||||
digest_size: int
|
||||
digestsize: int
|
||||
block_size: int
|
||||
def __init__(self, content: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, content=None) -> None: ...
|
||||
def update(self, content) -> None: ...
|
||||
def copy(self): ...
|
||||
def digest(self): ...
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from passlib.utils import SequenceMixin
|
||||
@@ -24,8 +23,8 @@ class HashInfo(SequenceMixin):
|
||||
def supported_by_hashlib_pbkdf2(self): ...
|
||||
|
||||
def compile_hmac(digest, key, multipart: bool = False): ...
|
||||
def pbkdf1(digest, secret, salt, rounds, keylen: Incomplete | None = None): ...
|
||||
def pbkdf2_hmac(digest, secret, salt, rounds, keylen: Incomplete | None = None): ...
|
||||
def pbkdf1(digest, secret, salt, rounds, keylen=None): ...
|
||||
def pbkdf2_hmac(digest, secret, salt, rounds, keylen=None): ...
|
||||
|
||||
__all__ = [
|
||||
# hash utils
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class UnknownBackendError(ValueError):
|
||||
@@ -12,15 +11,15 @@ class PasswordValueError(ValueError): ...
|
||||
|
||||
class PasswordSizeError(PasswordValueError):
|
||||
max_size: Any
|
||||
def __init__(self, max_size, msg: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, max_size, msg=None) -> None: ...
|
||||
|
||||
class PasswordTruncateError(PasswordSizeError):
|
||||
def __init__(self, cls, msg: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, cls, msg=None) -> None: ...
|
||||
|
||||
class PasslibSecurityError(RuntimeError): ...
|
||||
|
||||
class TokenError(ValueError):
|
||||
def __init__(self, msg: Incomplete | None = None, *args, **kwds) -> None: ...
|
||||
def __init__(self, msg=None, *args, **kwds) -> None: ...
|
||||
|
||||
class MalformedTokenError(TokenError): ...
|
||||
class InvalidTokenError(TokenError): ...
|
||||
@@ -32,7 +31,7 @@ class UsedTokenError(TokenError):
|
||||
class UnknownHashError(ValueError):
|
||||
value: Any
|
||||
message: Any
|
||||
def __init__(self, message: Incomplete | None = None, value: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, message=None, value=None) -> None: ...
|
||||
|
||||
class PasslibWarning(UserWarning): ...
|
||||
class PasslibConfigWarning(PasslibWarning): ...
|
||||
@@ -43,11 +42,11 @@ class PasslibSecurityWarning(PasslibWarning): ...
|
||||
def type_name(value): ...
|
||||
def ExpectedTypeError(value, expected, param): ...
|
||||
def ExpectedStringError(value, param): ...
|
||||
def MissingDigestError(handler: Incomplete | None = None): ...
|
||||
def NullPasswordError(handler: Incomplete | None = None): ...
|
||||
def InvalidHashError(handler: Incomplete | None = None): ...
|
||||
def MalformedHashError(handler: Incomplete | None = None, reason: Incomplete | None = None): ...
|
||||
def ZeroPaddedRoundsError(handler: Incomplete | None = None): ...
|
||||
def MissingDigestError(handler=None): ...
|
||||
def NullPasswordError(handler=None): ...
|
||||
def InvalidHashError(handler=None): ...
|
||||
def MalformedHashError(handler=None, reason=None): ...
|
||||
def ZeroPaddedRoundsError(handler=None): ...
|
||||
def ChecksumSizeError(handler, raw: bool = False): ...
|
||||
|
||||
ENABLE_DEBUG_ONLY_REPR: bool
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
__all__ = ["DJANGO_VERSION", "MIN_DJANGO_VERSION", "get_preset_config", "quirks"]
|
||||
@@ -15,7 +14,7 @@ def get_preset_config(name): ...
|
||||
|
||||
class DjangoTranslator:
|
||||
context: Any
|
||||
def __init__(self, context: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, context=None, **kwds) -> None: ...
|
||||
def reset_hashers(self) -> None: ...
|
||||
def passlib_to_django_name(self, passlib_name): ...
|
||||
def passlib_to_django(self, passlib_hasher, cached: bool = True): ...
|
||||
@@ -29,13 +28,13 @@ class DjangoContextAdapter(DjangoTranslator):
|
||||
enabled: bool
|
||||
patched: bool
|
||||
log: Any
|
||||
def __init__(self, context: Incomplete | None = None, get_user_category: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, context=None, get_user_category=None, **kwds) -> None: ...
|
||||
def reset_hashers(self) -> None: ...
|
||||
def get_hashers(self): ...
|
||||
def get_hasher(self, algorithm: str = "default"): ...
|
||||
def identify_hasher(self, encoded): ...
|
||||
def make_password(self, password, salt: Incomplete | None = None, hasher: str = "default"): ...
|
||||
def check_password(self, password, encoded, setter: Incomplete | None = None, preferred: str = "default"): ...
|
||||
def make_password(self, password, salt=None, hasher: str = "default"): ...
|
||||
def check_password(self, password, encoded, setter=None, preferred: str = "default"): ...
|
||||
def user_check_password(self, user, password): ...
|
||||
def user_set_password(self, user, password) -> None: ...
|
||||
def get_user_category(self, user): ...
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -39,29 +38,21 @@ class _Argon2Common( # type: ignore[misc]
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls,
|
||||
type: Incomplete | None = None,
|
||||
memory_cost: Incomplete | None = None,
|
||||
salt_len: Incomplete | None = None,
|
||||
time_cost: Incomplete | None = None,
|
||||
digest_size: Incomplete | None = None,
|
||||
checksum_size: Incomplete | None = None,
|
||||
hash_len: Incomplete | None = None,
|
||||
max_threads: Incomplete | None = None,
|
||||
type=None,
|
||||
memory_cost=None,
|
||||
salt_len=None,
|
||||
time_cost=None,
|
||||
digest_size=None,
|
||||
checksum_size=None,
|
||||
hash_len=None,
|
||||
max_threads=None,
|
||||
**kwds,
|
||||
): ...
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
def __init__(
|
||||
self,
|
||||
type: Incomplete | None = None,
|
||||
type_d: bool = False,
|
||||
version: Incomplete | None = None,
|
||||
memory_cost: Incomplete | None = None,
|
||||
data: Incomplete | None = None,
|
||||
**kwds,
|
||||
) -> None: ...
|
||||
def __init__(self, type=None, type_d: bool = False, version=None, memory_cost=None, data=None, **kwds) -> None: ...
|
||||
|
||||
class _NoBackend(_Argon2Common):
|
||||
@classmethod
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -46,12 +45,12 @@ class bcrypt_sha256(_wrapped_bcrypt):
|
||||
default_ident: ClassVar[str]
|
||||
version: ClassVar[int]
|
||||
@classmethod
|
||||
def using(cls, version: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def using(cls, version=None, **kwds): ... # type: ignore[override]
|
||||
prefix: Any
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
def __init__(self, version: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, version=None, **kwds) -> None: ...
|
||||
|
||||
__all__ = ["bcrypt"]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -7,7 +6,7 @@ class HexDigestHash(uh.StaticHandler):
|
||||
checksum_chars: ClassVar[str]
|
||||
supported: ClassVar[bool]
|
||||
|
||||
def create_hex_hash(digest, module="passlib.handlers.digests", django_name: Incomplete | None = None, required: bool = True): ...
|
||||
def create_hex_hash(digest, module="passlib.handlers.digests", django_name=None, required: bool = True): ...
|
||||
|
||||
hex_md4: Any
|
||||
hex_md5: Any
|
||||
@@ -21,7 +20,7 @@ class htdigest(uh.MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
context_kwds: ClassVar[tuple[str, ...]]
|
||||
@classmethod
|
||||
def hash(cls, secret, user, realm, encoding: Incomplete | None = None): ... # type: ignore[override]
|
||||
def hash(cls, secret, user, realm, encoding=None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, user, realm, encoding: str = "utf-8"): ... # type: ignore[override]
|
||||
@classmethod
|
||||
@@ -29,6 +28,6 @@ class htdigest(uh.MinimalHandler):
|
||||
@classmethod
|
||||
def genconfig(cls): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, user, realm, encoding: Incomplete | None = None): ... # type: ignore[override]
|
||||
def genhash(cls, secret, config, user, realm, encoding=None): ... # type: ignore[override]
|
||||
|
||||
__all__ = ["create_hex_hash", "hex_md4", "hex_md5", "hex_sha1", "hex_sha256", "hex_sha512"]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -19,7 +18,7 @@ class unix_disabled(DisabledHash, uh.MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
context_kwds: ClassVar[tuple[str, ...]]
|
||||
@classmethod
|
||||
def using(cls, marker: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def using(cls, marker=None, **kwds): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
@classmethod
|
||||
@@ -27,7 +26,7 @@ class unix_disabled(DisabledHash, uh.MinimalHandler):
|
||||
@classmethod
|
||||
def hash(cls, secret: str | bytes, **kwds) -> str: ...
|
||||
@classmethod
|
||||
def genhash(cls, secret: str | bytes, config, marker: Incomplete | None = None): ... # type: ignore[override]
|
||||
def genhash(cls, secret: str | bytes, config, marker=None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def disable(cls, hash: str | bytes | None = None) -> str: ...
|
||||
@classmethod
|
||||
@@ -41,7 +40,7 @@ class plaintext(uh.MinimalHandler):
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes): ...
|
||||
@classmethod
|
||||
def hash(cls, secret: str | bytes, encoding: Incomplete | None = None): ... # type: ignore[override]
|
||||
def hash(cls, secret: str | bytes, encoding=None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, encoding: str | None = None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
|
||||
@@ -23,8 +23,8 @@ class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
@classmethod
|
||||
def using(cls, default_algs: Incomplete | None = None, algs: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, algs: Incomplete | None = None, **kwds) -> None: ...
|
||||
def using(cls, default_algs=None, algs=None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, algs=None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, full: bool = False): ... # type: ignore[override]
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -18,13 +17,13 @@ class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum
|
||||
parallelism: int
|
||||
block_size: int
|
||||
@classmethod
|
||||
def using(cls, block_size: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def using(cls, block_size=None, **kwds): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
@classmethod
|
||||
def parse(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
def __init__(self, block_size: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, block_size=None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def get_backend(cls): ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar, Literal, overload
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -9,7 +8,7 @@ class lmhash(uh.TruncateMixin, uh.HasEncodingContext, uh.StaticHandler):
|
||||
checksum_size: ClassVar[int]
|
||||
truncate_size: ClassVar[int]
|
||||
@classmethod
|
||||
def raw(cls, secret, encoding: Incomplete | None = None): ...
|
||||
def raw(cls, secret, encoding=None): ...
|
||||
|
||||
class nthash(uh.StaticHandler):
|
||||
name: ClassVar[str]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class classproperty:
|
||||
@@ -22,24 +21,12 @@ class memoized_property:
|
||||
def __init__(self, func) -> None: ...
|
||||
def __get__(self, obj, cls): ...
|
||||
def clear_cache(self, obj) -> None: ...
|
||||
def peek_cache(self, obj, default: Incomplete | None = None): ...
|
||||
def peek_cache(self, obj, default=None): ...
|
||||
|
||||
def deprecated_function(
|
||||
msg: Incomplete | None = None,
|
||||
deprecated: Incomplete | None = None,
|
||||
removed: Incomplete | None = None,
|
||||
updoc: bool = True,
|
||||
replacement: Incomplete | None = None,
|
||||
_is_method: bool = False,
|
||||
func_module: Incomplete | None = None,
|
||||
): ...
|
||||
def deprecated_method(
|
||||
msg: Incomplete | None = None,
|
||||
deprecated: Incomplete | None = None,
|
||||
removed: Incomplete | None = None,
|
||||
updoc: bool = True,
|
||||
replacement: Incomplete | None = None,
|
||||
msg=None, deprecated=None, removed=None, updoc: bool = True, replacement=None, _is_method: bool = False, func_module=None
|
||||
): ...
|
||||
def deprecated_method(msg=None, deprecated=None, removed=None, updoc: bool = True, replacement=None): ...
|
||||
|
||||
__all__ = [
|
||||
"classproperty",
|
||||
|
||||
@@ -12,10 +12,8 @@ PADDED_B64_CHARS = PADDED_BASE64_CHARS
|
||||
UC_HEX_CHARS = UPPER_HEX_CHARS
|
||||
LC_HEX_CHARS = LOWER_HEX_CHARS
|
||||
|
||||
def parse_mc2(hash, prefix, sep="$", handler: Incomplete | None = None): ...
|
||||
def parse_mc3(
|
||||
hash, prefix, sep="$", rounds_base: int = 10, default_rounds: Incomplete | None = None, handler: Incomplete | None = None
|
||||
): ...
|
||||
def parse_mc2(hash, prefix, sep="$", handler=None): ...
|
||||
def parse_mc3(hash, prefix, sep="$", rounds_base: int = 10, default_rounds=None, handler=None): ...
|
||||
def render_mc2(ident, salt, checksum, sep="$"): ...
|
||||
def render_mc3(ident, rounds, salt, checksum, sep="$", rounds_base: int = 10): ...
|
||||
|
||||
@@ -68,13 +66,13 @@ class HasEncodingContext(GenericHandler):
|
||||
|
||||
class HasUserContext(GenericHandler):
|
||||
user: Incomplete | None
|
||||
def __init__(self, user: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, user=None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def hash(cls, secret, user: Incomplete | None = None, **context): ...
|
||||
def hash(cls, secret, user=None, **context): ...
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, user: Incomplete | None = None, **context): ...
|
||||
def verify(cls, secret, hash, user=None, **context): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, user: Incomplete | None = None, **context): ...
|
||||
def genhash(cls, secret, config, user=None, **context): ...
|
||||
|
||||
class HasRawChecksum(GenericHandler): ...
|
||||
|
||||
@@ -84,10 +82,8 @@ class HasManyIdents(GenericHandler):
|
||||
ident_aliases: ClassVar[dict[str, str] | None]
|
||||
ident: str # type: ignore[misc]
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls, default_ident: Incomplete | None = None, ident: Incomplete | None = None, **kwds
|
||||
): ...
|
||||
def __init__(self, ident: Incomplete | None = None, **kwds) -> None: ...
|
||||
def using(cls, default_ident=None, ident=None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, ident=None, **kwds) -> None: ...
|
||||
|
||||
class HasSalt(GenericHandler):
|
||||
min_salt_size: ClassVar[int]
|
||||
@@ -120,24 +116,24 @@ class HasRounds(GenericHandler):
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls,
|
||||
min_desired_rounds: Incomplete | None = None,
|
||||
max_desired_rounds: Incomplete | None = None,
|
||||
default_rounds: Incomplete | None = None,
|
||||
vary_rounds: Incomplete | None = None,
|
||||
min_rounds: Incomplete | None = None,
|
||||
max_rounds: Incomplete | None = None,
|
||||
rounds: Incomplete | None = None,
|
||||
min_desired_rounds=None,
|
||||
max_desired_rounds=None,
|
||||
default_rounds=None,
|
||||
vary_rounds=None,
|
||||
min_rounds=None,
|
||||
max_rounds=None,
|
||||
rounds=None,
|
||||
**kwds,
|
||||
): ...
|
||||
def __init__(self, rounds: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __init__(self, rounds=None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def bitsize(cls, rounds: Incomplete | None = None, vary_rounds: float = 0.1, **kwds): ...
|
||||
def bitsize(cls, rounds=None, vary_rounds: float = 0.1, **kwds): ...
|
||||
|
||||
class ParallelismMixin(GenericHandler):
|
||||
parallelism: int
|
||||
@classmethod
|
||||
def using(cls, parallelism: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, parallelism: Incomplete | None = None, **kwds) -> None: ...
|
||||
def using(cls, parallelism=None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, parallelism=None, **kwds) -> None: ...
|
||||
|
||||
class BackendMixin(PasswordHash, metaclass=abc.ABCMeta):
|
||||
backends: ClassVar[tuple[str, ...] | None]
|
||||
@@ -156,16 +152,7 @@ class PrefixWrapper:
|
||||
prefix: Any
|
||||
orig_prefix: Any
|
||||
__doc__: Any
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
wrapped,
|
||||
prefix="",
|
||||
orig_prefix="",
|
||||
lazy: bool = False,
|
||||
doc: Incomplete | None = None,
|
||||
ident: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def __init__(self, name, wrapped, prefix="", orig_prefix="", lazy: bool = False, doc=None, ident=None) -> None: ...
|
||||
@property
|
||||
def wrapped(self): ...
|
||||
@property
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from passlib.crypto.digest import norm_hash_name as norm_hash_name
|
||||
|
||||
def get_prf(name): ...
|
||||
def pbkdf1(secret, salt, rounds, keylen: Incomplete | None = None, hash: str = "sha1"): ...
|
||||
def pbkdf2(secret, salt, rounds, keylen: Incomplete | None = None, prf: str = "hmac-sha1"): ...
|
||||
def pbkdf1(secret, salt, rounds, keylen=None, hash: str = "sha1"): ...
|
||||
def pbkdf2(secret, salt, rounds, keylen=None, prf: str = "hmac-sha1"): ...
|
||||
|
||||
__all__ = [
|
||||
# hash utils
|
||||
|
||||
Reference in New Issue
Block a user