mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add default values for third-party stubs beginning with 'P' (#9957)
This commit is contained in:
@@ -11,12 +11,12 @@ class _CommonFile:
|
||||
def from_path(cls, path, **kwds): ...
|
||||
def __init__(
|
||||
self,
|
||||
path: Incomplete | None = ...,
|
||||
new: bool = ...,
|
||||
autoload: bool = ...,
|
||||
autosave: bool = ...,
|
||||
encoding: str = ...,
|
||||
return_unicode=...,
|
||||
path: Incomplete | None = None,
|
||||
new: bool = False,
|
||||
autoload: bool = True,
|
||||
autosave: bool = False,
|
||||
encoding: str = "utf-8",
|
||||
return_unicode=True,
|
||||
) -> None: ...
|
||||
@property
|
||||
def path(self): ...
|
||||
@@ -25,14 +25,14 @@ class _CommonFile:
|
||||
@property
|
||||
def mtime(self): ...
|
||||
def load_if_changed(self): ...
|
||||
def load(self, path: Incomplete | None = ..., force: bool = ...): ...
|
||||
def load(self, path: Incomplete | None = None, force: bool = True): ...
|
||||
def load_string(self, data) -> None: ...
|
||||
def save(self, path: Incomplete | None = ...) -> None: ...
|
||||
def save(self, path: Incomplete | None = None) -> None: ...
|
||||
def to_string(self): ...
|
||||
|
||||
class HtpasswdFile(_CommonFile):
|
||||
context: Any
|
||||
def __init__(self, path: Incomplete | None = ..., default_scheme: Incomplete | None = ..., context=..., **kwds) -> None: ...
|
||||
def __init__(self, path: Incomplete | None = None, default_scheme: Incomplete | None = None, context=..., **kwds) -> None: ...
|
||||
def users(self): ...
|
||||
def set_password(self, user, password): ...
|
||||
def update(self, user, password): ...
|
||||
@@ -45,15 +45,15 @@ class HtpasswdFile(_CommonFile):
|
||||
|
||||
class HtdigestFile(_CommonFile):
|
||||
default_realm: Any
|
||||
def __init__(self, path: Incomplete | None = ..., default_realm: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, path: Incomplete | None = None, default_realm: Incomplete | None = None, **kwds) -> None: ...
|
||||
def realms(self): ...
|
||||
def users(self, realm: Incomplete | None = ...): ...
|
||||
def set_password(self, user, realm: Incomplete | None = ..., password=...): ...
|
||||
def users(self, realm: Incomplete | None = None): ...
|
||||
def set_password(self, user, realm: Incomplete | None = None, password=...): ...
|
||||
def update(self, user, realm, password): ...
|
||||
def get_hash(self, user, realm: Incomplete | None = ...): ...
|
||||
def set_hash(self, user, realm: Incomplete | None = ..., hash=...): ...
|
||||
def get_hash(self, user, realm: Incomplete | None = None): ...
|
||||
def set_hash(self, user, realm: Incomplete | None = None, hash=...): ...
|
||||
def find(self, user, realm): ...
|
||||
def delete(self, user, realm: Incomplete | None = ...): ...
|
||||
def delete(self, user, realm: Incomplete | None = None): ...
|
||||
def delete_realm(self, realm): ...
|
||||
def check_password(self, user, realm: Incomplete | None = ..., password=...): ...
|
||||
def check_password(self, user, realm: Incomplete | None = None, password=...): ...
|
||||
def verify(self, user, realm, password): ...
|
||||
|
||||
@@ -4,53 +4,55 @@ from typing_extensions import Self
|
||||
|
||||
class CryptPolicy:
|
||||
@classmethod
|
||||
def from_path(cls, path, section: str = ..., encoding: str = ...): ...
|
||||
def from_path(cls, path, section: str = "passlib", encoding: str = "utf-8"): ...
|
||||
@classmethod
|
||||
def from_string(cls, source, section: str = ..., encoding: str = ...): ...
|
||||
def from_string(cls, source, section: str = "passlib", encoding: str = "utf-8"): ...
|
||||
@classmethod
|
||||
def from_source(cls, source, _warn: bool = ...): ...
|
||||
def from_source(cls, source, _warn: bool = True): ...
|
||||
@classmethod
|
||||
def from_sources(cls, sources, _warn: bool = ...): ...
|
||||
def from_sources(cls, sources, _warn: bool = True): ...
|
||||
def replace(self, *args, **kwds): ...
|
||||
def __init__(self, *args, **kwds) -> None: ...
|
||||
def has_schemes(self): ...
|
||||
def iter_handlers(self): ...
|
||||
def schemes(self, resolve: bool = ...): ...
|
||||
def get_handler(self, name: Incomplete | None = ..., category: Incomplete | None = ..., required: bool = ...): ...
|
||||
def get_min_verify_time(self, category: Incomplete | None = ...): ...
|
||||
def get_options(self, name, category: Incomplete | None = ...): ...
|
||||
def handler_is_deprecated(self, name, category: Incomplete | None = ...): ...
|
||||
def iter_config(self, ini: bool = ..., resolve: bool = ...): ...
|
||||
def to_dict(self, resolve: bool = ...): ...
|
||||
def to_file(self, stream, section: str = ...) -> None: ...
|
||||
def to_string(self, section: str = ..., encoding: Incomplete | None = ...): ...
|
||||
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 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): ...
|
||||
|
||||
class CryptContext:
|
||||
@classmethod
|
||||
def from_string(cls, source: str | bytes, section: str = ..., encoding: str = ...) -> Self: ...
|
||||
def from_string(cls, source: str | bytes, section: str = "passlib", encoding: str = "utf-8") -> Self: ...
|
||||
@classmethod
|
||||
def from_path(cls, path: StrOrBytesPath, section: str = ..., encoding: str = ...) -> Self: ...
|
||||
def from_path(cls, path: StrOrBytesPath, section: str = "passlib", encoding: str = "utf-8") -> Self: ...
|
||||
def copy(self, **kwds: Any) -> CryptContext: ...
|
||||
def using(self, **kwds: Any) -> CryptContext: ...
|
||||
def replace(self, **kwds): ...
|
||||
def __init__(self, schemes: Incomplete | None = ..., policy=..., _autoload: bool = ..., **kwds) -> None: ...
|
||||
def __init__(self, schemes: Incomplete | None = None, policy=..., _autoload: bool = True, **kwds) -> None: ...
|
||||
policy: CryptPolicy
|
||||
def load_path(self, path: StrOrBytesPath, update: bool = ..., section: str = ..., encoding: str = ...) -> None: ...
|
||||
def load_path(
|
||||
self, path: StrOrBytesPath, update: bool = False, section: str = "passlib", encoding: str = "utf-8"
|
||||
) -> None: ...
|
||||
def load(
|
||||
self,
|
||||
source: str | bytes | SupportsItems[str, Any] | CryptContext,
|
||||
update: bool = ...,
|
||||
section: str = ...,
|
||||
encoding: str = ...,
|
||||
update: bool = False,
|
||||
section: str = "passlib",
|
||||
encoding: str = "utf-8",
|
||||
) -> None: ...
|
||||
def update(self, *args: Any, **kwds: Any) -> None: ...
|
||||
def schemes(self, resolve: bool = ..., category: Incomplete | None = ..., unconfigured: bool = ...): ...
|
||||
def default_scheme(self, category: Incomplete | None = ..., resolve: bool = ..., unconfigured: bool = ...): ...
|
||||
def handler(self, scheme: Incomplete | None = ..., category: Incomplete | None = ..., unconfigured: bool = ...): ...
|
||||
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): ...
|
||||
@property
|
||||
def context_kwds(self): ...
|
||||
def to_dict(self, resolve: bool = ...) -> dict[str, Any]: ...
|
||||
def to_string(self, section: str = ...) -> str: ...
|
||||
def to_dict(self, resolve: bool = False) -> dict[str, Any]: ...
|
||||
def to_string(self, section: str = "passlib") -> str: ...
|
||||
mvt_estimate_max_samples: int
|
||||
mvt_estimate_min_samples: int
|
||||
mvt_estimate_max_time: int
|
||||
@@ -59,27 +61,27 @@ class CryptContext:
|
||||
min_verify_time: int
|
||||
def reset_min_verify_time(self) -> None: ...
|
||||
def needs_update(
|
||||
self, hash: str | bytes, scheme: str | None = ..., category: str | None = ..., secret: str | bytes | None = ...
|
||||
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 = ..., category: Incomplete | None = ...): ...
|
||||
def genconfig(self, scheme: Incomplete | None = ..., category: Incomplete | None = ..., **settings): ...
|
||||
def genhash(self, secret, config, scheme: Incomplete | None = ..., category: Incomplete | None = ..., **kwds): ...
|
||||
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 = ..., resolve: bool = ..., required: bool = ..., unconfigured: bool = ...
|
||||
self, hash, category: Incomplete | None = None, resolve: bool = False, required: bool = False, unconfigured: bool = False
|
||||
): ...
|
||||
def hash(self, secret: str | bytes, scheme: str | None = ..., category: str | None = ..., **kwds: Any) -> str: ...
|
||||
def hash(self, secret: str | bytes, scheme: str | None = None, category: str | None = None, **kwds: Any) -> str: ...
|
||||
def encrypt(self, *args, **kwds): ...
|
||||
def verify(
|
||||
self, secret: str | bytes, hash: str | bytes | None, scheme: str | None = ..., category: str | None = ..., **kwds: Any
|
||||
self, secret: str | bytes, hash: str | bytes | None, scheme: str | None = None, category: str | None = None, **kwds: Any
|
||||
) -> bool: ...
|
||||
def verify_and_update(
|
||||
self, secret: str | bytes, hash: str | bytes | None, scheme: str | None = ..., category: str | None = ..., **kwds: Any
|
||||
self, secret: str | bytes, hash: str | bytes | None, scheme: str | None = None, category: str | None = None, **kwds: Any
|
||||
) -> tuple[bool, str | None]: ...
|
||||
def dummy_verify(self, elapsed: int = ...): ...
|
||||
def dummy_verify(self, elapsed: int = 0): ...
|
||||
def is_enabled(self, hash: str | bytes) -> bool: ...
|
||||
def disable(self, hash: str | bytes | None = ...) -> str: ...
|
||||
def disable(self, hash: str | bytes | None = None) -> str: ...
|
||||
def enable(self, hash: str | bytes) -> str: ...
|
||||
|
||||
class LazyCryptContext(CryptContext):
|
||||
def __init__(self, schemes: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, schemes: Incomplete | None = None, **kwds) -> None: ...
|
||||
def __getattribute__(self, attr: str) -> Any: ...
|
||||
|
||||
@@ -5,7 +5,7 @@ def indent_block(block, padding): ...
|
||||
|
||||
BFSTR: Any
|
||||
|
||||
def render_encipher(write, indent: int = ...) -> None: ...
|
||||
def write_encipher_function(write, indent: int = ...) -> None: ...
|
||||
def write_expand_function(write, indent: int = ...) -> None: ...
|
||||
def render_encipher(write, indent: int = 0) -> None: ...
|
||||
def write_encipher_function(write, indent: int = 0) -> None: ...
|
||||
def write_expand_function(write, indent: int = 0) -> None: ...
|
||||
def main() -> None: ...
|
||||
|
||||
@@ -5,7 +5,7 @@ class BlowfishEngine:
|
||||
S: Any
|
||||
def __init__(self) -> None: ...
|
||||
@staticmethod
|
||||
def key_to_words(data, size: int = ...): ...
|
||||
def key_to_words(data, size: int = 18): ...
|
||||
def encipher(self, l, r): ...
|
||||
def expand(self, key_words) -> None: ...
|
||||
def eks_salted_expand(self, key_words, salt_words) -> None: ...
|
||||
|
||||
@@ -5,7 +5,7 @@ class md4:
|
||||
digest_size: int
|
||||
digestsize: int
|
||||
block_size: int
|
||||
def __init__(self, content: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, content: Incomplete | None = None) -> None: ...
|
||||
def update(self, content) -> None: ...
|
||||
def copy(self): ...
|
||||
def digest(self): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
__all__ = ["expand_des_key", "des_encrypt_block"]
|
||||
|
||||
def expand_des_key(key): ...
|
||||
def des_encrypt_block(key, input, salt: int = ..., rounds: int = ...): ...
|
||||
def des_encrypt_int_block(key, input, salt: int = ..., rounds: int = ...): ...
|
||||
def des_encrypt_block(key, input, salt: int = 0, rounds: int = 1): ...
|
||||
def des_encrypt_int_block(key, input, salt: int = 0, rounds: int = 1): ...
|
||||
|
||||
@@ -3,8 +3,8 @@ from typing import Any
|
||||
|
||||
from passlib.utils import SequenceMixin
|
||||
|
||||
def lookup_hash(digest, return_unknown: bool = ..., required: bool = ...): ...
|
||||
def norm_hash_name(name, format: str = ...): ...
|
||||
def lookup_hash(digest, return_unknown: bool = False, required: bool = True): ...
|
||||
def norm_hash_name(name, format: str = "hashlib"): ...
|
||||
|
||||
class HashInfo(SequenceMixin):
|
||||
name: Any
|
||||
@@ -15,7 +15,7 @@ class HashInfo(SequenceMixin):
|
||||
block_size: Any
|
||||
error_text: Any
|
||||
unknown: bool
|
||||
def __init__(self, const, names, required: bool = ...) -> None: ...
|
||||
def __init__(self, const, names, required: bool = True) -> None: ...
|
||||
@property
|
||||
def supported(self): ...
|
||||
@property
|
||||
@@ -23,6 +23,6 @@ class HashInfo(SequenceMixin):
|
||||
@property
|
||||
def supported_by_hashlib_pbkdf2(self): ...
|
||||
|
||||
def compile_hmac(digest, key, multipart: bool = ...): ...
|
||||
def pbkdf1(digest, secret, salt, rounds, keylen: Incomplete | None = ...): ...
|
||||
def pbkdf2_hmac(digest, secret, salt, rounds, keylen: Incomplete | None = ...): ...
|
||||
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): ...
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
def validate(n, r, p): ...
|
||||
def scrypt(secret, salt, n, r, p: int = ..., keylen: int = ...): ...
|
||||
def scrypt(secret, salt, n, r, p: int = 1, keylen: int = 32): ...
|
||||
|
||||
@@ -12,15 +12,15 @@ class PasswordValueError(ValueError): ...
|
||||
|
||||
class PasswordSizeError(PasswordValueError):
|
||||
max_size: Any
|
||||
def __init__(self, max_size, msg: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, max_size, msg: Incomplete | None = None) -> None: ...
|
||||
|
||||
class PasswordTruncateError(PasswordSizeError):
|
||||
def __init__(self, cls, msg: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, cls, msg: Incomplete | None = None) -> None: ...
|
||||
|
||||
class PasslibSecurityError(RuntimeError): ...
|
||||
|
||||
class TokenError(ValueError):
|
||||
def __init__(self, msg: Incomplete | None = ..., *args, **kwds) -> None: ...
|
||||
def __init__(self, msg: Incomplete | None = None, *args, **kwds) -> None: ...
|
||||
|
||||
class MalformedTokenError(TokenError): ...
|
||||
class InvalidTokenError(TokenError): ...
|
||||
@@ -32,7 +32,7 @@ class UsedTokenError(TokenError):
|
||||
class UnknownHashError(ValueError):
|
||||
value: Any
|
||||
message: Any
|
||||
def __init__(self, message: Incomplete | None = ..., value: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, message: Incomplete | None = None, value: Incomplete | None = None) -> None: ...
|
||||
|
||||
class PasslibWarning(UserWarning): ...
|
||||
class PasslibConfigWarning(PasslibWarning): ...
|
||||
@@ -43,14 +43,14 @@ class PasslibSecurityWarning(PasslibWarning): ...
|
||||
def type_name(value): ...
|
||||
def ExpectedTypeError(value, expected, param): ...
|
||||
def ExpectedStringError(value, param): ...
|
||||
def MissingDigestError(handler: Incomplete | None = ...): ...
|
||||
def NullPasswordError(handler: Incomplete | None = ...): ...
|
||||
def InvalidHashError(handler: Incomplete | None = ...): ...
|
||||
def MalformedHashError(handler: Incomplete | None = ..., reason: Incomplete | None = ...): ...
|
||||
def ZeroPaddedRoundsError(handler: Incomplete | None = ...): ...
|
||||
def ChecksumSizeError(handler, raw: bool = ...): ...
|
||||
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 ChecksumSizeError(handler, raw: bool = False): ...
|
||||
|
||||
ENABLE_DEBUG_ONLY_REPR: bool
|
||||
|
||||
def debug_only_repr(value, param: str = ...): ...
|
||||
def CryptBackendError(handler, config, hash, source: str = ...) -> None: ...
|
||||
def debug_only_repr(value, param: str = "hash"): ...
|
||||
def CryptBackendError(handler, config, hash, source: str = "crypt.crypt()") -> None: ...
|
||||
|
||||
@@ -15,13 +15,13 @@ def get_preset_config(name): ...
|
||||
|
||||
class DjangoTranslator:
|
||||
context: Any
|
||||
def __init__(self, context: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, context: Incomplete | None = 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 = ...): ...
|
||||
def passlib_to_django(self, passlib_hasher, cached: bool = True): ...
|
||||
def django_to_passlib_name(self, django_name): ...
|
||||
def django_to_passlib(self, django_name, cached: bool = ...): ...
|
||||
def resolve_django_hasher(self, django_name, cached: bool = ...): ...
|
||||
def django_to_passlib(self, django_name, cached: bool = True): ...
|
||||
def resolve_django_hasher(self, django_name, cached: bool = True): ...
|
||||
|
||||
class DjangoContextAdapter(DjangoTranslator):
|
||||
context: Any
|
||||
@@ -29,13 +29,13 @@ class DjangoContextAdapter(DjangoTranslator):
|
||||
enabled: bool
|
||||
patched: bool
|
||||
log: Any
|
||||
def __init__(self, context: Incomplete | None = ..., get_user_category: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, context: Incomplete | None = None, get_user_category: Incomplete | None = None, **kwds) -> None: ...
|
||||
def reset_hashers(self) -> None: ...
|
||||
def get_hashers(self): ...
|
||||
def get_hasher(self, algorithm: str = ...): ...
|
||||
def get_hasher(self, algorithm: str = "default"): ...
|
||||
def identify_hasher(self, encoded): ...
|
||||
def make_password(self, password, salt: Incomplete | None = ..., hasher: str = ...): ...
|
||||
def check_password(self, password, encoded, setter: Incomplete | None = ..., preferred: str = ...): ...
|
||||
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 user_check_password(self, user, password): ...
|
||||
def user_set_password(self, user, password) -> None: ...
|
||||
def get_user_category(self, user): ...
|
||||
|
||||
@@ -39,14 +39,14 @@ class _Argon2Common( # type: ignore[misc]
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls,
|
||||
type: Incomplete | None = ...,
|
||||
memory_cost: Incomplete | None = ...,
|
||||
salt_len: Incomplete | None = ...,
|
||||
time_cost: Incomplete | None = ...,
|
||||
digest_size: Incomplete | None = ...,
|
||||
checksum_size: Incomplete | None = ...,
|
||||
hash_len: Incomplete | None = ...,
|
||||
max_threads: Incomplete | None = ...,
|
||||
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,
|
||||
**kwds,
|
||||
): ...
|
||||
@classmethod
|
||||
@@ -55,11 +55,11 @@ class _Argon2Common( # type: ignore[misc]
|
||||
def from_string(cls, hash): ...
|
||||
def __init__(
|
||||
self,
|
||||
type: Incomplete | None = ...,
|
||||
type_d: bool = ...,
|
||||
version: Incomplete | None = ...,
|
||||
memory_cost: Incomplete | None = ...,
|
||||
data: Incomplete | None = ...,
|
||||
type: Incomplete | None = None,
|
||||
type_d: bool = False,
|
||||
version: Incomplete | None = None,
|
||||
memory_cost: Incomplete | None = None,
|
||||
data: Incomplete | None = None,
|
||||
**kwds,
|
||||
) -> None: ...
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ class bcrypt_sha256(_wrapped_bcrypt):
|
||||
default_ident: ClassVar[str]
|
||||
version: ClassVar[int]
|
||||
@classmethod
|
||||
def using(cls, version: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, version: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
prefix: Any
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
def __init__(self, version: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, version: Incomplete | None = None, **kwds) -> None: ...
|
||||
|
||||
@@ -18,10 +18,10 @@ class cisco_type7(uh.GenericHandler):
|
||||
min_salt_value: ClassVar[int]
|
||||
max_salt_value: ClassVar[int]
|
||||
@classmethod
|
||||
def using(cls, salt: int | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, salt: int | None = None, **kwds): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
salt: int
|
||||
def __init__(self, salt: int | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, salt: int | None = None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def decode(cls, hash, encoding: str = ...): ...
|
||||
def decode(cls, hash, encoding: str = "utf-8"): ...
|
||||
|
||||
@@ -7,7 +7,7 @@ class HexDigestHash(uh.StaticHandler):
|
||||
checksum_chars: ClassVar[str]
|
||||
supported: ClassVar[bool]
|
||||
|
||||
def create_hex_hash(digest, module=..., django_name: Incomplete | None = ..., required: bool = ...): ...
|
||||
def create_hex_hash(digest, module="passlib.handlers.digests", django_name: Incomplete | None = None, required: bool = True): ...
|
||||
|
||||
hex_md4: Any
|
||||
hex_md5: Any
|
||||
@@ -21,12 +21,12 @@ class htdigest(uh.MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
context_kwds: ClassVar[tuple[str, ...]]
|
||||
@classmethod
|
||||
def hash(cls, secret, user, realm, encoding: Incomplete | None = ...): ... # type: ignore[override]
|
||||
def hash(cls, secret, user, realm, encoding: Incomplete | None = None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, user, realm, encoding: str = ...): ... # type: ignore[override]
|
||||
def verify(cls, secret, hash, user, realm, encoding: str = "utf-8"): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def genconfig(cls): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, user, realm, encoding: Incomplete | None = ...): ... # type: ignore[override]
|
||||
def genhash(cls, secret, config, user, realm, encoding: Incomplete | None = None): ... # type: ignore[override]
|
||||
|
||||
@@ -14,10 +14,10 @@ class fshp(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
rounds_cost: ClassVar[str]
|
||||
default_variant: ClassVar[int]
|
||||
@classmethod
|
||||
def using(cls, variant: int | str | bytes | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, variant: int | str | bytes | None = None, **kwds): ... # type: ignore[override]
|
||||
variant: int | None
|
||||
use_defaults: Any
|
||||
def __init__(self, variant: int | str | bytes | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, variant: int | str | bytes | None = None, **kwds) -> None: ...
|
||||
@property
|
||||
def checksum_alg(self): ...
|
||||
@property
|
||||
|
||||
@@ -9,9 +9,9 @@ class unix_fallback(DisabledHash, uh.StaticHandler):
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
enable_wildcard: Any
|
||||
def __init__(self, enable_wildcard: bool = ..., **kwds) -> None: ...
|
||||
def __init__(self, enable_wildcard: bool = False, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, enable_wildcard: bool = ...): ... # type: ignore[override]
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, enable_wildcard: bool = False): ... # type: ignore[override]
|
||||
|
||||
class unix_disabled(DisabledHash, uh.MinimalHandler):
|
||||
name: ClassVar[str]
|
||||
@@ -19,7 +19,7 @@ class unix_disabled(DisabledHash, uh.MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
context_kwds: ClassVar[tuple[str, ...]]
|
||||
@classmethod
|
||||
def using(cls, marker: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, marker: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
@classmethod
|
||||
@@ -27,9 +27,9 @@ 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 = ...): ... # type: ignore[override]
|
||||
def genhash(cls, secret: str | bytes, config, marker: Incomplete | None = None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def disable(cls, hash: str | bytes | None = ...) -> str: ...
|
||||
def disable(cls, hash: str | bytes | None = None) -> str: ...
|
||||
@classmethod
|
||||
def enable(cls, hash: str | bytes) -> str: ...
|
||||
|
||||
@@ -41,10 +41,10 @@ class plaintext(uh.MinimalHandler):
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes): ...
|
||||
@classmethod
|
||||
def hash(cls, secret: str | bytes, encoding: Incomplete | None = ...): ... # type: ignore[override]
|
||||
def hash(cls, secret: str | bytes, encoding: Incomplete | None = None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, encoding: str | None = ...): ... # type: ignore[override]
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, encoding: str | None = None): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def genconfig(cls): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, encoding: str | None = ...): ... # type: ignore[override]
|
||||
def genhash(cls, secret, config, encoding: str | None = None): ... # type: ignore[override]
|
||||
|
||||
@@ -17,13 +17,13 @@ class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
@classmethod
|
||||
def extract_digest_info(cls, hash, alg): ...
|
||||
@classmethod
|
||||
def extract_digest_algs(cls, hash, format: str = ...): ...
|
||||
def extract_digest_algs(cls, hash, format: str = "iana"): ...
|
||||
@classmethod
|
||||
def derive_digest(cls, password, salt, rounds, alg): ...
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
@classmethod
|
||||
def using(cls, default_algs: Incomplete | None = ..., algs: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, algs: Incomplete | None = ..., **kwds) -> None: ...
|
||||
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: ...
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, full: bool = ...): ... # type: ignore[override]
|
||||
def verify(cls, secret, hash, full: bool = False): ... # type: ignore[override]
|
||||
|
||||
@@ -18,16 +18,16 @@ class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum
|
||||
parallelism: int
|
||||
block_size: int
|
||||
@classmethod
|
||||
def using(cls, block_size: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, block_size: Incomplete | None = 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 = ..., **kwds) -> None: ...
|
||||
def __init__(self, block_size: Incomplete | None = None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def get_backend(cls): ...
|
||||
@classmethod
|
||||
def has_backend(cls, name: str = ...): ...
|
||||
def has_backend(cls, name: str = "any"): ...
|
||||
@classmethod
|
||||
def set_backend(cls, name: str = ..., dryrun: bool = ...) -> None: ...
|
||||
def set_backend(cls, name: str = "any", dryrun: bool = False) -> None: ...
|
||||
|
||||
@@ -19,5 +19,5 @@ class sha1_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler
|
||||
rounds_cost: ClassVar[str]
|
||||
@classmethod
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def to_string(self, config: bool = ...) -> str: ...
|
||||
def to_string(self, config: bool = False) -> str: ...
|
||||
backends: ClassVar[tuple[str, ...]]
|
||||
|
||||
@@ -11,7 +11,7 @@ class _SHA2_Common(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandl
|
||||
max_rounds: ClassVar[int]
|
||||
rounds_cost: ClassVar[str]
|
||||
implicit_rounds: bool
|
||||
def __init__(self, implicit_rounds: bool | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, implicit_rounds: bool | None = None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
backends: ClassVar[tuple[str, ...]]
|
||||
|
||||
@@ -16,9 +16,9 @@ class sun_md5_crypt(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignor
|
||||
rounds_cost: ClassVar[str]
|
||||
ident_values: ClassVar[tuple[str, ...]]
|
||||
bare_salt: bool
|
||||
def __init__(self, bare_salt: bool = ..., **kwds) -> None: ...
|
||||
def __init__(self, bare_salt: bool = False, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def to_string(self, _withchk: bool = ...) -> str: ...
|
||||
def to_string(self, _withchk: bool = True) -> str: ...
|
||||
|
||||
@@ -9,7 +9,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 = ...): ...
|
||||
def raw(cls, secret, encoding: Incomplete | None = None): ...
|
||||
|
||||
class nthash(uh.StaticHandler):
|
||||
name: ClassVar[str]
|
||||
@@ -18,7 +18,7 @@ class nthash(uh.StaticHandler):
|
||||
@classmethod
|
||||
def raw(cls, secret): ...
|
||||
@classmethod
|
||||
def raw_nthash(cls, secret, hex: bool = ...): ...
|
||||
def raw_nthash(cls, secret, hex: bool = False): ...
|
||||
|
||||
bsd_nthash: Any
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ class PasswordHash(metaclass=ABCMeta):
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, **context_kwds): ...
|
||||
@classmethod
|
||||
@abstractmethod
|
||||
def using(cls, relaxed: bool = ..., **kwds: Any) -> type[Self]: ...
|
||||
def using(cls, relaxed: bool = False, **kwds: Any) -> type[Self]: ...
|
||||
@classmethod
|
||||
def needs_update(cls, hash: str, secret: str | bytes | None = ...) -> bool: ...
|
||||
def needs_update(cls, hash: str, secret: str | bytes | None = None) -> bool: ...
|
||||
@classmethod
|
||||
@abstractmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
@@ -32,6 +32,6 @@ class PasswordHash(metaclass=ABCMeta):
|
||||
class DisabledHash(PasswordHash, metaclass=ABCMeta):
|
||||
is_disabled: ClassVar[Literal[True]]
|
||||
@classmethod
|
||||
def disable(cls, hash: str | None = ...) -> str: ...
|
||||
def disable(cls, hash: str | None = None) -> str: ...
|
||||
@classmethod
|
||||
def enable(cls, hash: str) -> str: ...
|
||||
|
||||
@@ -11,14 +11,14 @@ class SequenceGenerator:
|
||||
@abstractmethod
|
||||
def symbol_count(self) -> int: ...
|
||||
def __init__(
|
||||
self, entropy: Incomplete | None = ..., length: Incomplete | None = ..., rng: Incomplete | None = ..., **kwds
|
||||
self, entropy: Incomplete | None = None, length: Incomplete | None = None, rng: Incomplete | None = None, **kwds
|
||||
) -> None: ...
|
||||
@property
|
||||
def entropy_per_symbol(self) -> float: ...
|
||||
@property
|
||||
def entropy(self) -> float: ...
|
||||
def __next__(self) -> None: ...
|
||||
def __call__(self, returns: Incomplete | None = ...): ...
|
||||
def __call__(self, returns: Incomplete | None = None): ...
|
||||
def __iter__(self): ...
|
||||
|
||||
default_charsets: Any
|
||||
@@ -26,12 +26,12 @@ default_charsets: Any
|
||||
class WordGenerator(SequenceGenerator):
|
||||
charset: str
|
||||
chars: Any
|
||||
def __init__(self, chars: Incomplete | None = ..., charset: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, chars: Incomplete | None = None, charset: Incomplete | None = None, **kwds) -> None: ...
|
||||
@property
|
||||
def symbol_count(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
def genword(entropy: Incomplete | None = ..., length: Incomplete | None = ..., returns: Incomplete | None = ..., **kwds): ...
|
||||
def genword(entropy: Incomplete | None = None, length: Incomplete | None = None, returns: Incomplete | None = None, **kwds): ...
|
||||
|
||||
class WordsetDict(MutableMapping[Any, Any]):
|
||||
paths: Any
|
||||
@@ -51,10 +51,10 @@ class PhraseGenerator(SequenceGenerator):
|
||||
words: Any
|
||||
sep: str
|
||||
def __init__(
|
||||
self, wordset: Incomplete | None = ..., words: Incomplete | None = ..., sep: Incomplete | None = ..., **kwds
|
||||
self, wordset: Incomplete | None = None, words: Incomplete | None = None, sep: Incomplete | None = None, **kwds
|
||||
) -> None: ...
|
||||
@property
|
||||
def symbol_count(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
def genphrase(entropy: Incomplete | None = ..., length: Incomplete | None = ..., returns: Incomplete | None = ..., **kwds): ...
|
||||
def genphrase(entropy: Incomplete | None = None, length: Incomplete | None = None, returns: Incomplete | None = None, **kwds): ...
|
||||
|
||||
@@ -9,6 +9,6 @@ class _PasslibRegistryProxy:
|
||||
def __dir__(self): ...
|
||||
|
||||
def register_crypt_handler_path(name, path) -> None: ...
|
||||
def register_crypt_handler(handler, force: bool = ..., _attr: Incomplete | None = ...) -> None: ...
|
||||
def register_crypt_handler(handler, force: bool = False, _attr: Incomplete | None = None) -> None: ...
|
||||
def get_crypt_handler(name, default=...): ...
|
||||
def list_crypt_handlers(loaded_only: bool = ...): ...
|
||||
def list_crypt_handlers(loaded_only: bool = False): ...
|
||||
|
||||
@@ -15,10 +15,10 @@ class AppWallet:
|
||||
default_tag: Any
|
||||
def __init__(
|
||||
self,
|
||||
secrets: Incomplete | None = ...,
|
||||
default_tag: Incomplete | None = ...,
|
||||
encrypt_cost: Incomplete | None = ...,
|
||||
secrets_path: Incomplete | None = ...,
|
||||
secrets: Incomplete | None = None,
|
||||
default_tag: Incomplete | None = None,
|
||||
encrypt_cost: Incomplete | None = None,
|
||||
secrets_path: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
@property
|
||||
def has_secrets(self): ...
|
||||
@@ -40,28 +40,28 @@ class TOTP:
|
||||
@classmethod
|
||||
def using(
|
||||
cls,
|
||||
digits: Incomplete | None = ...,
|
||||
alg: Incomplete | None = ...,
|
||||
period: Incomplete | None = ...,
|
||||
issuer: Incomplete | None = ...,
|
||||
wallet: Incomplete | None = ...,
|
||||
now: Incomplete | None = ...,
|
||||
digits: Incomplete | None = None,
|
||||
alg: Incomplete | None = None,
|
||||
period: Incomplete | None = None,
|
||||
issuer: Incomplete | None = None,
|
||||
wallet: Incomplete | None = None,
|
||||
now: Incomplete | None = None,
|
||||
**kwds,
|
||||
): ...
|
||||
@classmethod
|
||||
def new(cls, **kwds): ...
|
||||
def __init__(
|
||||
self,
|
||||
key: Incomplete | None = ...,
|
||||
format: str = ...,
|
||||
new: bool = ...,
|
||||
digits: Incomplete | None = ...,
|
||||
alg: Incomplete | None = ...,
|
||||
size: Incomplete | None = ...,
|
||||
period: Incomplete | None = ...,
|
||||
label: Incomplete | None = ...,
|
||||
issuer: Incomplete | None = ...,
|
||||
changed: bool = ...,
|
||||
key: Incomplete | None = None,
|
||||
format: str = "base32",
|
||||
new: bool = False,
|
||||
digits: Incomplete | None = None,
|
||||
alg: Incomplete | None = None,
|
||||
size: Incomplete | None = None,
|
||||
period: Incomplete | None = None,
|
||||
label: Incomplete | None = None,
|
||||
issuer: Incomplete | None = None,
|
||||
changed: bool = False,
|
||||
**kwds,
|
||||
) -> None: ...
|
||||
@property
|
||||
@@ -76,27 +76,27 @@ class TOTP:
|
||||
def hex_key(self): ...
|
||||
@property
|
||||
def base32_key(self): ...
|
||||
def pretty_key(self, format: str = ..., sep: str = ...): ...
|
||||
def pretty_key(self, format: str = "base32", sep: str = "-"): ...
|
||||
@classmethod
|
||||
def normalize_time(cls, time): ...
|
||||
def normalize_token(self_or_cls, token): ...
|
||||
def generate(self, time: Incomplete | None = ...): ...
|
||||
def generate(self, time: Incomplete | None = None): ...
|
||||
@classmethod
|
||||
def verify(cls, token, source, **kwds): ...
|
||||
def match(
|
||||
self, token, time: Incomplete | None = ..., window: int = ..., skew: int = ..., last_counter: Incomplete | None = ...
|
||||
self, token, time: Incomplete | None = None, window: int = 30, skew: int = 0, last_counter: Incomplete | None = None
|
||||
): ...
|
||||
@classmethod
|
||||
def from_source(cls, source): ...
|
||||
@classmethod
|
||||
def from_uri(cls, uri): ...
|
||||
def to_uri(self, label: Incomplete | None = ..., issuer: Incomplete | None = ...): ...
|
||||
def to_uri(self, label: Incomplete | None = None, issuer: Incomplete | None = None): ...
|
||||
@classmethod
|
||||
def from_json(cls, source): ...
|
||||
def to_json(self, encrypt: Incomplete | None = ...): ...
|
||||
def to_json(self, encrypt: Incomplete | None = None): ...
|
||||
@classmethod
|
||||
def from_dict(cls, source): ...
|
||||
def to_dict(self, encrypt: Incomplete | None = ...): ...
|
||||
def to_dict(self, encrypt: Incomplete | None = None): ...
|
||||
|
||||
class TotpToken(SequenceMixin):
|
||||
totp: Any
|
||||
@@ -117,7 +117,7 @@ class TotpMatch(SequenceMixin):
|
||||
counter: int
|
||||
time: int
|
||||
window: int
|
||||
def __init__(self, totp, counter, time, window: int = ...) -> None: ...
|
||||
def __init__(self, totp, counter, time, window: int = 30) -> None: ...
|
||||
@property
|
||||
def expected_counter(self): ...
|
||||
@property
|
||||
|
||||
@@ -48,14 +48,14 @@ class SequenceMixin:
|
||||
consteq = compare_digest
|
||||
|
||||
def str_consteq(left, right): ...
|
||||
def saslprep(source, param: str = ...): ...
|
||||
def saslprep(source, param: str = "value"): ...
|
||||
def render_bytes(source, *args): ...
|
||||
def xor_bytes(left, right): ...
|
||||
def is_same_codec(left, right): ...
|
||||
def is_ascii_safe(source): ...
|
||||
def to_bytes(source, encoding: str = ..., param: str = ..., source_encoding: Incomplete | None = ...): ...
|
||||
def to_unicode(source, encoding: str = ..., param: str = ...): ...
|
||||
def to_native_str(source, encoding: str = ..., param: str = ...): ...
|
||||
def to_bytes(source, encoding: str = "utf-8", param: str = "value", source_encoding: Incomplete | None = None): ...
|
||||
def to_unicode(source, encoding: str = "utf-8", param: str = "value"): ...
|
||||
def to_native_str(source, encoding: str = "utf-8", param: str = "value"): ...
|
||||
|
||||
has_crypt: bool
|
||||
|
||||
@@ -68,7 +68,7 @@ rng: Any
|
||||
|
||||
def getrandbytes(rng, count) -> Generator[None, None, Any]: ...
|
||||
def getrandstr(rng, charset, count) -> Generator[None, None, Any]: ...
|
||||
def generate_password(size: int = ..., charset=...): ...
|
||||
def generate_password(size: int = 10, charset=...): ...
|
||||
def is_crypt_handler(obj): ...
|
||||
def is_crypt_context(obj): ...
|
||||
def has_rounds_info(handler): ...
|
||||
|
||||
@@ -11,7 +11,7 @@ UPPER_HEX_CHARS: Any
|
||||
LOWER_HEX_CHARS: Any
|
||||
ALL_BYTE_VALUES: Any
|
||||
|
||||
def compile_byte_translation(mapping, source: Incomplete | None = ...): ...
|
||||
def compile_byte_translation(mapping, source: Incomplete | None = None): ...
|
||||
def b64s_encode(data): ...
|
||||
def b64s_decode(data): ...
|
||||
def ab64_encode(data): ...
|
||||
@@ -22,7 +22,7 @@ def b32decode(source): ...
|
||||
class Base64Engine:
|
||||
bytemap: Any
|
||||
big: Any
|
||||
def __init__(self, charmap, big: bool = ...) -> None: ...
|
||||
def __init__(self, charmap, big: bool = False) -> None: ...
|
||||
@property
|
||||
def charmap(self): ...
|
||||
def encode_bytes(self, source): ...
|
||||
|
||||
@@ -22,21 +22,21 @@ 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 = ...): ...
|
||||
def peek_cache(self, obj, default: Incomplete | None = None): ...
|
||||
|
||||
def deprecated_function(
|
||||
msg: Incomplete | None = ...,
|
||||
deprecated: Incomplete | None = ...,
|
||||
removed: Incomplete | None = ...,
|
||||
updoc: bool = ...,
|
||||
replacement: Incomplete | None = ...,
|
||||
_is_method: bool = ...,
|
||||
func_module: Incomplete | None = ...,
|
||||
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 = ...,
|
||||
deprecated: Incomplete | None = ...,
|
||||
removed: Incomplete | None = ...,
|
||||
updoc: bool = ...,
|
||||
replacement: Incomplete | None = ...,
|
||||
msg: Incomplete | None = None,
|
||||
deprecated: Incomplete | None = None,
|
||||
removed: Incomplete | None = None,
|
||||
updoc: bool = True,
|
||||
replacement: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
@@ -5,4 +5,4 @@ from passlib.crypto.des import (
|
||||
)
|
||||
from passlib.utils.decor import deprecated_function as deprecated_function
|
||||
|
||||
def mdes_encrypt_int_block(key, input, salt: int = ..., rounds: int = ...): ...
|
||||
def mdes_encrypt_int_block(key, input, salt: int = 0, rounds: int = 1): ...
|
||||
|
||||
@@ -12,22 +12,22 @@ 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 = ...): ...
|
||||
def parse_mc2(hash, prefix, sep="$", handler: Incomplete | None = None): ...
|
||||
def parse_mc3(
|
||||
hash, prefix, sep=..., rounds_base: int = ..., default_rounds: Incomplete | None = ..., handler: Incomplete | None = ...
|
||||
hash, prefix, sep="$", rounds_base: int = 10, default_rounds: Incomplete | None = None, handler: Incomplete | None = None
|
||||
): ...
|
||||
def render_mc2(ident, salt, checksum, sep=...): ...
|
||||
def render_mc3(ident, rounds, salt, checksum, sep=..., rounds_base: int = ...): ...
|
||||
def render_mc2(ident, salt, checksum, sep="$"): ...
|
||||
def render_mc3(ident, rounds, salt, checksum, sep="$", rounds_base: int = 10): ...
|
||||
|
||||
class MinimalHandler(PasswordHash, metaclass=abc.ABCMeta):
|
||||
@classmethod
|
||||
def using(cls, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
def using(cls, relaxed: bool = False) -> type[Self]: ... # type: ignore[override]
|
||||
|
||||
class TruncateMixin(MinimalHandler, metaclass=abc.ABCMeta):
|
||||
truncate_error: ClassVar[bool]
|
||||
truncate_verify_reject: ClassVar[bool]
|
||||
@classmethod
|
||||
def using(cls, truncate_error: object = ..., *, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
def using(cls, truncate_error: object = None, *, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
|
||||
class GenericHandler(MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
@@ -37,7 +37,7 @@ class GenericHandler(MinimalHandler):
|
||||
checksum_chars: ClassVar[str | None]
|
||||
checksum: str | None
|
||||
use_defaults: bool
|
||||
def __init__(self, checksum: str | None = ..., use_defaults: bool = ...) -> None: ...
|
||||
def __init__(self, checksum: str | None = None, use_defaults: bool = False) -> None: ...
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
@classmethod
|
||||
@@ -52,9 +52,9 @@ class GenericHandler(MinimalHandler):
|
||||
@classmethod
|
||||
def genhash(cls, secret: str | bytes, config: str, **context: Any) -> str: ...
|
||||
@classmethod
|
||||
def needs_update(cls, hash: str | bytes, secret: str | bytes | None = ..., **kwds: Any) -> bool: ...
|
||||
def needs_update(cls, hash: str | bytes, secret: str | bytes | None = None, **kwds: Any) -> bool: ...
|
||||
@classmethod
|
||||
def parsehash(cls, hash: str | bytes, checksum: bool = ..., sanitize: bool = ...) -> dict[str, Any]: ...
|
||||
def parsehash(cls, hash: str | bytes, checksum: bool = True, sanitize: bool = False) -> dict[str, Any]: ...
|
||||
@classmethod
|
||||
def bitsize(cls, **kwds: Any) -> dict[str, Any]: ...
|
||||
|
||||
@@ -64,17 +64,17 @@ class StaticHandler(GenericHandler):
|
||||
class HasEncodingContext(GenericHandler):
|
||||
default_encoding: ClassVar[str]
|
||||
encoding: str
|
||||
def __init__(self, encoding: str | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, encoding: str | None = None, **kwds) -> None: ...
|
||||
|
||||
class HasUserContext(GenericHandler):
|
||||
user: Incomplete | None
|
||||
def __init__(self, user: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, user: Incomplete | None = None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def hash(cls, secret, user: Incomplete | None = ..., **context): ...
|
||||
def hash(cls, secret, user: Incomplete | None = None, **context): ...
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, user: Incomplete | None = ..., **context): ...
|
||||
def verify(cls, secret, hash, user: Incomplete | None = None, **context): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, user: Incomplete | None = ..., **context): ...
|
||||
def genhash(cls, secret, config, user: Incomplete | None = None, **context): ...
|
||||
|
||||
class HasRawChecksum(GenericHandler): ...
|
||||
|
||||
@@ -84,8 +84,8 @@ class HasManyIdents(GenericHandler):
|
||||
ident_aliases: ClassVar[dict[str, str] | None]
|
||||
ident: str # type: ignore[misc]
|
||||
@classmethod
|
||||
def using(cls, default_ident: Incomplete | None = ..., ident: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, ident: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def using(cls, default_ident: Incomplete | None = None, ident: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, ident: Incomplete | None = None, **kwds) -> None: ...
|
||||
|
||||
class HasSalt(GenericHandler):
|
||||
min_salt_size: ClassVar[int]
|
||||
@@ -95,10 +95,10 @@ class HasSalt(GenericHandler):
|
||||
default_salt_chars: ClassVar[str | None]
|
||||
salt: str | bytes | None
|
||||
@classmethod
|
||||
def using(cls, default_salt_size: int | None = ..., salt_size: int | None = ..., salt: str | bytes | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, salt: str | bytes | None = ..., **kwds) -> None: ...
|
||||
def using(cls, default_salt_size: int | None = None, salt_size: int | None = None, salt: str | bytes | None = None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, salt: str | bytes | None = None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def bitsize(cls, salt_size: int | None = ..., **kwds): ...
|
||||
def bitsize(cls, salt_size: int | None = None, **kwds): ...
|
||||
|
||||
class HasRawSalt(HasSalt):
|
||||
salt_chars: ClassVar[bytes] # type: ignore[assignment]
|
||||
@@ -116,33 +116,33 @@ class HasRounds(GenericHandler):
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls,
|
||||
min_desired_rounds: Incomplete | None = ...,
|
||||
max_desired_rounds: Incomplete | None = ...,
|
||||
default_rounds: Incomplete | None = ...,
|
||||
vary_rounds: Incomplete | None = ...,
|
||||
min_rounds: Incomplete | None = ...,
|
||||
max_rounds: Incomplete | None = ...,
|
||||
rounds: Incomplete | None = ...,
|
||||
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,
|
||||
**kwds,
|
||||
): ...
|
||||
def __init__(self, rounds: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, rounds: Incomplete | None = None, **kwds) -> None: ...
|
||||
@classmethod
|
||||
def bitsize(cls, rounds: Incomplete | None = ..., vary_rounds: float = ..., **kwds): ...
|
||||
def bitsize(cls, rounds: Incomplete | None = None, vary_rounds: float = 0.1, **kwds): ...
|
||||
|
||||
class ParallelismMixin(GenericHandler):
|
||||
parallelism: int
|
||||
@classmethod
|
||||
def using(cls, parallelism: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, parallelism: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def using(cls, parallelism: Incomplete | None = None, **kwds): ... # type: ignore[override]
|
||||
def __init__(self, parallelism: Incomplete | None = None, **kwds) -> None: ...
|
||||
|
||||
class BackendMixin(PasswordHash, metaclass=abc.ABCMeta):
|
||||
backends: ClassVar[tuple[str, ...] | None]
|
||||
@classmethod
|
||||
def get_backend(cls): ...
|
||||
@classmethod
|
||||
def has_backend(cls, name: str = ...) -> bool: ...
|
||||
def has_backend(cls, name: str = "any") -> bool: ...
|
||||
@classmethod
|
||||
def set_backend(cls, name: str = ..., dryrun: bool = ...): ...
|
||||
def set_backend(cls, name: str = "any", dryrun: bool = False): ...
|
||||
|
||||
class SubclassBackendMixin(BackendMixin, metaclass=abc.ABCMeta): ...
|
||||
class HasManyBackends(BackendMixin, GenericHandler): ...
|
||||
@@ -156,11 +156,11 @@ class PrefixWrapper:
|
||||
self,
|
||||
name,
|
||||
wrapped,
|
||||
prefix=...,
|
||||
orig_prefix=...,
|
||||
lazy: bool = ...,
|
||||
doc: Incomplete | None = ...,
|
||||
ident: Incomplete | None = ...,
|
||||
prefix="",
|
||||
orig_prefix="",
|
||||
lazy: bool = False,
|
||||
doc: Incomplete | None = None,
|
||||
ident: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
@property
|
||||
def wrapped(self): ...
|
||||
|
||||
@@ -3,5 +3,5 @@ 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 = ..., hash: str = ...): ...
|
||||
def pbkdf2(secret, salt, rounds, keylen: Incomplete | None = ..., prf: str = ...): ...
|
||||
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"): ...
|
||||
|
||||
@@ -4,4 +4,4 @@ from passlib.hash import nthash as nthash
|
||||
|
||||
raw_nthash: Any
|
||||
|
||||
def raw_lmhash(secret, encoding: str = ..., hex: bool = ...): ...
|
||||
def raw_lmhash(secret, encoding: str = "ascii", hex: bool = False): ...
|
||||
|
||||
Reference in New Issue
Block a user