mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-28 12:32:20 +08:00
Replace Any with Incomplete in many places (#9558)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class _CommonFile:
|
||||
@@ -10,7 +11,7 @@ class _CommonFile:
|
||||
def from_path(cls, path, **kwds): ...
|
||||
def __init__(
|
||||
self,
|
||||
path: Any | None = ...,
|
||||
path: Incomplete | None = ...,
|
||||
new: bool = ...,
|
||||
autoload: bool = ...,
|
||||
autosave: bool = ...,
|
||||
@@ -24,14 +25,14 @@ class _CommonFile:
|
||||
@property
|
||||
def mtime(self): ...
|
||||
def load_if_changed(self): ...
|
||||
def load(self, path: Any | None = ..., force: bool = ...): ...
|
||||
def load(self, path: Incomplete | None = ..., force: bool = ...): ...
|
||||
def load_string(self, data) -> None: ...
|
||||
def save(self, path: Any | None = ...) -> None: ...
|
||||
def save(self, path: Incomplete | None = ...) -> None: ...
|
||||
def to_string(self): ...
|
||||
|
||||
class HtpasswdFile(_CommonFile):
|
||||
context: Any
|
||||
def __init__(self, path: Any | None = ..., default_scheme: Any | None = ..., context=..., **kwds) -> None: ...
|
||||
def __init__(self, path: Incomplete | None = ..., default_scheme: Incomplete | None = ..., context=..., **kwds) -> None: ...
|
||||
def users(self): ...
|
||||
def set_password(self, user, password): ...
|
||||
def update(self, user, password): ...
|
||||
@@ -44,15 +45,15 @@ class HtpasswdFile(_CommonFile):
|
||||
|
||||
class HtdigestFile(_CommonFile):
|
||||
default_realm: Any
|
||||
def __init__(self, path: Any | None = ..., default_realm: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, path: Incomplete | None = ..., default_realm: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def realms(self): ...
|
||||
def users(self, realm: Any | None = ...): ...
|
||||
def set_password(self, user, realm: Any | None = ..., password=...): ...
|
||||
def users(self, realm: Incomplete | None = ...): ...
|
||||
def set_password(self, user, realm: Incomplete | None = ..., password=...): ...
|
||||
def update(self, user, realm, password): ...
|
||||
def get_hash(self, user, realm: Any | None = ...): ...
|
||||
def set_hash(self, user, realm: Any | None = ..., hash=...): ...
|
||||
def get_hash(self, user, realm: Incomplete | None = ...): ...
|
||||
def set_hash(self, user, realm: Incomplete | None = ..., hash=...): ...
|
||||
def find(self, user, realm): ...
|
||||
def delete(self, user, realm: Any | None = ...): ...
|
||||
def delete(self, user, realm: Incomplete | None = ...): ...
|
||||
def delete_realm(self, realm): ...
|
||||
def check_password(self, user, realm: Any | None = ..., password=...): ...
|
||||
def check_password(self, user, realm: Incomplete | None = ..., password=...): ...
|
||||
def verify(self, user, realm, password): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Self, StrOrBytesPath, SupportsItems
|
||||
from _typeshed import Incomplete, Self, StrOrBytesPath, SupportsItems
|
||||
from typing import Any
|
||||
|
||||
class CryptPolicy:
|
||||
@@ -15,14 +15,14 @@ class CryptPolicy:
|
||||
def has_schemes(self): ...
|
||||
def iter_handlers(self): ...
|
||||
def schemes(self, resolve: bool = ...): ...
|
||||
def get_handler(self, name: Any | None = ..., category: Any | None = ..., required: bool = ...): ...
|
||||
def get_min_verify_time(self, category: Any | None = ...): ...
|
||||
def get_options(self, name, category: Any | None = ...): ...
|
||||
def handler_is_deprecated(self, name, category: Any | None = ...): ...
|
||||
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: Any | None = ...): ...
|
||||
def to_string(self, section: str = ..., encoding: Incomplete | None = ...): ...
|
||||
|
||||
class CryptContext:
|
||||
@classmethod
|
||||
@@ -32,7 +32,7 @@ class CryptContext:
|
||||
def copy(self, **kwds: Any) -> CryptContext: ...
|
||||
def using(self, **kwds: Any) -> CryptContext: ...
|
||||
def replace(self, **kwds): ...
|
||||
def __init__(self, schemes: Any | None = ..., policy=..., _autoload: bool = ..., **kwds) -> None: ...
|
||||
def __init__(self, schemes: Incomplete | None = ..., policy=..., _autoload: bool = ..., **kwds) -> None: ...
|
||||
policy: CryptPolicy
|
||||
def load_path(self, path: StrOrBytesPath, update: bool = ..., section: str = ..., encoding: str = ...) -> None: ...
|
||||
def load(
|
||||
@@ -43,9 +43,9 @@ class CryptContext:
|
||||
encoding: str = ...,
|
||||
) -> None: ...
|
||||
def update(self, *args: Any, **kwds: Any) -> None: ...
|
||||
def schemes(self, resolve: bool = ..., category: Any | None = ..., unconfigured: bool = ...): ...
|
||||
def default_scheme(self, category: Any | None = ..., resolve: bool = ..., unconfigured: bool = ...): ...
|
||||
def handler(self, scheme: Any | None = ..., category: Any | None = ..., unconfigured: bool = ...): ...
|
||||
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 = ...): ...
|
||||
@property
|
||||
def context_kwds(self): ...
|
||||
def to_dict(self, resolve: bool = ...) -> dict[str, Any]: ...
|
||||
@@ -60,10 +60,12 @@ class CryptContext:
|
||||
def needs_update(
|
||||
self, hash: str | bytes, scheme: str | None = ..., category: str | None = ..., secret: str | bytes | None = ...
|
||||
) -> bool: ...
|
||||
def hash_needs_update(self, hash, scheme: Any | None = ..., category: Any | None = ...): ...
|
||||
def genconfig(self, scheme: Any | None = ..., category: Any | None = ..., **settings): ...
|
||||
def genhash(self, secret, config, scheme: Any | None = ..., category: Any | None = ..., **kwds): ...
|
||||
def identify(self, hash, category: Any | None = ..., resolve: bool = ..., required: bool = ..., unconfigured: 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 identify(
|
||||
self, hash, category: Incomplete | None = ..., resolve: bool = ..., required: bool = ..., unconfigured: bool = ...
|
||||
): ...
|
||||
def hash(self, secret: str | bytes, scheme: str | None = ..., category: str | None = ..., **kwds: Any) -> str: ...
|
||||
def encrypt(self, *args, **kwds): ...
|
||||
def verify(
|
||||
@@ -78,5 +80,5 @@ class CryptContext:
|
||||
def enable(self, hash: str | bytes) -> str: ...
|
||||
|
||||
class LazyCryptContext(CryptContext):
|
||||
def __init__(self, schemes: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, schemes: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def __getattribute__(self, attr: str) -> Any: ...
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class md4:
|
||||
name: str
|
||||
digest_size: int
|
||||
digestsize: int
|
||||
block_size: int
|
||||
def __init__(self, content: Any | None = ...) -> None: ...
|
||||
def __init__(self, content: Incomplete | None = ...) -> None: ...
|
||||
def update(self, content) -> None: ...
|
||||
def copy(self): ...
|
||||
def digest(self): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from passlib.utils import SequenceMixin
|
||||
@@ -23,5 +24,5 @@ class HashInfo(SequenceMixin):
|
||||
def supported_by_hashlib_pbkdf2(self): ...
|
||||
|
||||
def compile_hmac(digest, key, multipart: bool = ...): ...
|
||||
def pbkdf1(digest, secret, salt, rounds, keylen: Any | None = ...): ...
|
||||
def pbkdf2_hmac(digest, secret, salt, rounds, keylen: Any | None = ...): ...
|
||||
def pbkdf1(digest, secret, salt, rounds, keylen: Incomplete | None = ...): ...
|
||||
def pbkdf2_hmac(digest, secret, salt, rounds, keylen: Incomplete | None = ...): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class UnknownBackendError(ValueError):
|
||||
@@ -11,15 +12,15 @@ class PasswordValueError(ValueError): ...
|
||||
|
||||
class PasswordSizeError(PasswordValueError):
|
||||
max_size: Any
|
||||
def __init__(self, max_size, msg: Any | None = ...) -> None: ...
|
||||
def __init__(self, max_size, msg: Incomplete | None = ...) -> None: ...
|
||||
|
||||
class PasswordTruncateError(PasswordSizeError):
|
||||
def __init__(self, cls, msg: Any | None = ...) -> None: ...
|
||||
def __init__(self, cls, msg: Incomplete | None = ...) -> None: ...
|
||||
|
||||
class PasslibSecurityError(RuntimeError): ...
|
||||
|
||||
class TokenError(ValueError):
|
||||
def __init__(self, msg: Any | None = ..., *args, **kwds) -> None: ...
|
||||
def __init__(self, msg: Incomplete | None = ..., *args, **kwds) -> None: ...
|
||||
|
||||
class MalformedTokenError(TokenError): ...
|
||||
class InvalidTokenError(TokenError): ...
|
||||
@@ -31,7 +32,7 @@ class UsedTokenError(TokenError):
|
||||
class UnknownHashError(ValueError):
|
||||
value: Any
|
||||
message: Any
|
||||
def __init__(self, message: Any | None = ..., value: Any | None = ...) -> None: ...
|
||||
def __init__(self, message: Incomplete | None = ..., value: Incomplete | None = ...) -> None: ...
|
||||
|
||||
class PasslibWarning(UserWarning): ...
|
||||
class PasslibConfigWarning(PasslibWarning): ...
|
||||
@@ -42,11 +43,11 @@ class PasslibSecurityWarning(PasslibWarning): ...
|
||||
def type_name(value): ...
|
||||
def ExpectedTypeError(value, expected, param): ...
|
||||
def ExpectedStringError(value, param): ...
|
||||
def MissingDigestError(handler: Any | None = ...): ...
|
||||
def NullPasswordError(handler: Any | None = ...): ...
|
||||
def InvalidHashError(handler: Any | None = ...): ...
|
||||
def MalformedHashError(handler: Any | None = ..., reason: Any | None = ...): ...
|
||||
def ZeroPaddedRoundsError(handler: Any | None = ...): ...
|
||||
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 = ...): ...
|
||||
|
||||
ENABLE_DEBUG_ONLY_REPR: bool
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
__all__ = ["DJANGO_VERSION", "MIN_DJANGO_VERSION", "get_preset_config", "quirks"]
|
||||
@@ -14,7 +15,7 @@ def get_preset_config(name): ...
|
||||
|
||||
class DjangoTranslator:
|
||||
context: Any
|
||||
def __init__(self, context: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, context: Incomplete | 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 = ...): ...
|
||||
@@ -28,13 +29,13 @@ class DjangoContextAdapter(DjangoTranslator):
|
||||
enabled: bool
|
||||
patched: bool
|
||||
log: Any
|
||||
def __init__(self, context: Any | None = ..., get_user_category: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, context: Incomplete | None = ..., get_user_category: Incomplete | None = ..., **kwds) -> None: ...
|
||||
def reset_hashers(self) -> None: ...
|
||||
def get_hashers(self): ...
|
||||
def get_hasher(self, algorithm: str = ...): ...
|
||||
def identify_hasher(self, encoded): ...
|
||||
def make_password(self, password, salt: Any | None = ..., hasher: str = ...): ...
|
||||
def check_password(self, password, encoded, setter: Any | None = ..., preferred: str = ...): ...
|
||||
def make_password(self, password, salt: Incomplete | None = ..., hasher: str = ...): ...
|
||||
def check_password(self, password, encoded, setter: Incomplete | None = ..., preferred: str = ...): ...
|
||||
def user_check_password(self, user, password): ...
|
||||
def user_set_password(self, user, password) -> None: ...
|
||||
def get_user_category(self, user): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -38,14 +39,14 @@ class _Argon2Common( # type: ignore[misc]
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls,
|
||||
type: Any | None = ...,
|
||||
memory_cost: Any | None = ...,
|
||||
salt_len: Any | None = ...,
|
||||
time_cost: Any | None = ...,
|
||||
digest_size: Any | None = ...,
|
||||
checksum_size: Any | None = ...,
|
||||
hash_len: Any | None = ...,
|
||||
max_threads: Any | None = ...,
|
||||
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 = ...,
|
||||
**kwds,
|
||||
): ...
|
||||
@classmethod
|
||||
@@ -54,11 +55,11 @@ class _Argon2Common( # type: ignore[misc]
|
||||
def from_string(cls, hash): ...
|
||||
def __init__(
|
||||
self,
|
||||
type: Any | None = ...,
|
||||
type: Incomplete | None = ...,
|
||||
type_d: bool = ...,
|
||||
version: Any | None = ...,
|
||||
memory_cost: Any | None = ...,
|
||||
data: Any | None = ...,
|
||||
version: Incomplete | None = ...,
|
||||
memory_cost: Incomplete | None = ...,
|
||||
data: Incomplete | None = ...,
|
||||
**kwds,
|
||||
) -> None: ...
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -45,10 +46,10 @@ class bcrypt_sha256(_wrapped_bcrypt):
|
||||
default_ident: ClassVar[str]
|
||||
version: ClassVar[int]
|
||||
@classmethod
|
||||
def using(cls, version: Any | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, version: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
prefix: Any
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
def __init__(self, version: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, version: Incomplete | None = ..., **kwds) -> None: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -6,7 +7,7 @@ class HexDigestHash(uh.StaticHandler):
|
||||
checksum_chars: ClassVar[str]
|
||||
supported: ClassVar[bool]
|
||||
|
||||
def create_hex_hash(digest, module=..., django_name: Any | None = ..., required: bool = ...): ...
|
||||
def create_hex_hash(digest, module=..., django_name: Incomplete | None = ..., required: bool = ...): ...
|
||||
|
||||
hex_md4: Any
|
||||
hex_md5: Any
|
||||
@@ -20,7 +21,7 @@ class htdigest(uh.MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
context_kwds: ClassVar[tuple[str, ...]]
|
||||
@classmethod
|
||||
def hash(cls, secret, user, realm, encoding: Any | None = ...): ... # type: ignore[override]
|
||||
def hash(cls, secret, user, realm, encoding: Incomplete | None = ...): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, user, realm, encoding: str = ...): ... # type: ignore[override]
|
||||
@classmethod
|
||||
@@ -28,4 +29,4 @@ class htdigest(uh.MinimalHandler):
|
||||
@classmethod
|
||||
def genconfig(cls): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, user, realm, encoding: Any | None = ...): ... # type: ignore[override]
|
||||
def genhash(cls, secret, config, user, realm, encoding: Incomplete | None = ...): ... # type: ignore[override]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -18,7 +19,7 @@ class unix_disabled(DisabledHash, uh.MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
context_kwds: ClassVar[tuple[str, ...]]
|
||||
@classmethod
|
||||
def using(cls, marker: Any | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, marker: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
@classmethod
|
||||
@@ -26,7 +27,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: Any | None = ...): ... # type: ignore[override]
|
||||
def genhash(cls, secret: str | bytes, config, marker: Incomplete | None = ...): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def disable(cls, hash: str | bytes | None = ...) -> str: ...
|
||||
@classmethod
|
||||
@@ -40,7 +41,7 @@ class plaintext(uh.MinimalHandler):
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes): ...
|
||||
@classmethod
|
||||
def hash(cls, secret: str | bytes, encoding: Any | None = ...): ... # type: ignore[override]
|
||||
def hash(cls, secret: str | bytes, encoding: Incomplete | None = ...): ... # type: ignore[override]
|
||||
@classmethod
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, encoding: str | None = ...): ... # type: ignore[override]
|
||||
@classmethod
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -22,7 +23,7 @@ class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
@classmethod
|
||||
def from_string(cls, hash): ...
|
||||
@classmethod
|
||||
def using(cls, default_algs: Any | None = ..., algs: Any | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, algs: Any | None = ..., **kwds) -> None: ...
|
||||
def using(cls, default_algs: Incomplete | None = ..., algs: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, algs: Incomplete | None = ..., **kwds) -> None: ...
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, full: bool = ...): ... # type: ignore[override]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, ClassVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
@@ -17,13 +18,13 @@ class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum
|
||||
parallelism: int
|
||||
block_size: int
|
||||
@classmethod
|
||||
def using(cls, block_size: Any | None = ..., **kwds): ... # type: ignore[override]
|
||||
def using(cls, block_size: Incomplete | 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: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, block_size: Incomplete | None = ..., **kwds) -> None: ...
|
||||
@classmethod
|
||||
def get_backend(cls): ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
@@ -8,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: Any | None = ...): ...
|
||||
def raw(cls, secret, encoding: Incomplete | None = ...): ...
|
||||
|
||||
class nthash(uh.StaticHandler):
|
||||
name: ClassVar[str]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from abc import abstractmethod
|
||||
from collections.abc import MutableMapping
|
||||
from typing import Any
|
||||
@@ -9,13 +10,15 @@ class SequenceGenerator:
|
||||
@property
|
||||
@abstractmethod
|
||||
def symbol_count(self) -> int: ...
|
||||
def __init__(self, entropy: Any | None = ..., length: Any | None = ..., rng: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(
|
||||
self, entropy: Incomplete | None = ..., length: Incomplete | None = ..., rng: Incomplete | None = ..., **kwds
|
||||
) -> None: ...
|
||||
@property
|
||||
def entropy_per_symbol(self) -> float: ...
|
||||
@property
|
||||
def entropy(self) -> float: ...
|
||||
def __next__(self) -> None: ...
|
||||
def __call__(self, returns: Any | None = ...): ...
|
||||
def __call__(self, returns: Incomplete | None = ...): ...
|
||||
def __iter__(self): ...
|
||||
|
||||
default_charsets: Any
|
||||
@@ -23,12 +26,12 @@ default_charsets: Any
|
||||
class WordGenerator(SequenceGenerator):
|
||||
charset: str
|
||||
chars: Any
|
||||
def __init__(self, chars: Any | None = ..., charset: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, chars: Incomplete | None = ..., charset: Incomplete | None = ..., **kwds) -> None: ...
|
||||
@property
|
||||
def symbol_count(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
def genword(entropy: Any | None = ..., length: Any | None = ..., returns: Any | None = ..., **kwds): ...
|
||||
def genword(entropy: Incomplete | None = ..., length: Incomplete | None = ..., returns: Incomplete | None = ..., **kwds): ...
|
||||
|
||||
class WordsetDict(MutableMapping[Any, Any]):
|
||||
paths: Any
|
||||
@@ -47,9 +50,11 @@ class PhraseGenerator(SequenceGenerator):
|
||||
wordset: str
|
||||
words: Any
|
||||
sep: str
|
||||
def __init__(self, wordset: Any | None = ..., words: Any | None = ..., sep: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(
|
||||
self, wordset: Incomplete | None = ..., words: Incomplete | None = ..., sep: Incomplete | None = ..., **kwds
|
||||
) -> None: ...
|
||||
@property
|
||||
def symbol_count(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
def genphrase(entropy: Any | None = ..., length: Any | None = ..., returns: Any | None = ..., **kwds): ...
|
||||
def genphrase(entropy: Incomplete | None = ..., length: Incomplete | None = ..., returns: Incomplete | None = ..., **kwds): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class _PasslibRegistryProxy:
|
||||
@@ -8,6 +9,6 @@ class _PasslibRegistryProxy:
|
||||
def __dir__(self): ...
|
||||
|
||||
def register_crypt_handler_path(name, path) -> None: ...
|
||||
def register_crypt_handler(handler, force: bool = ..., _attr: Any | None = ...) -> None: ...
|
||||
def register_crypt_handler(handler, force: bool = ..., _attr: Incomplete | None = ...) -> None: ...
|
||||
def get_crypt_handler(name, default=...): ...
|
||||
def list_crypt_handlers(loaded_only: bool = ...): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from passlib.exc import (
|
||||
@@ -14,10 +15,10 @@ class AppWallet:
|
||||
default_tag: Any
|
||||
def __init__(
|
||||
self,
|
||||
secrets: Any | None = ...,
|
||||
default_tag: Any | None = ...,
|
||||
encrypt_cost: Any | None = ...,
|
||||
secrets_path: Any | None = ...,
|
||||
secrets: Incomplete | None = ...,
|
||||
default_tag: Incomplete | None = ...,
|
||||
encrypt_cost: Incomplete | None = ...,
|
||||
secrets_path: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def has_secrets(self): ...
|
||||
@@ -39,27 +40,27 @@ class TOTP:
|
||||
@classmethod
|
||||
def using(
|
||||
cls,
|
||||
digits: Any | None = ...,
|
||||
alg: Any | None = ...,
|
||||
period: Any | None = ...,
|
||||
issuer: Any | None = ...,
|
||||
wallet: Any | None = ...,
|
||||
now: Any | None = ...,
|
||||
digits: Incomplete | None = ...,
|
||||
alg: Incomplete | None = ...,
|
||||
period: Incomplete | None = ...,
|
||||
issuer: Incomplete | None = ...,
|
||||
wallet: Incomplete | None = ...,
|
||||
now: Incomplete | None = ...,
|
||||
**kwds,
|
||||
): ...
|
||||
@classmethod
|
||||
def new(cls, **kwds): ...
|
||||
def __init__(
|
||||
self,
|
||||
key: Any | None = ...,
|
||||
key: Incomplete | None = ...,
|
||||
format: str = ...,
|
||||
new: bool = ...,
|
||||
digits: Any | None = ...,
|
||||
alg: Any | None = ...,
|
||||
size: Any | None = ...,
|
||||
period: Any | None = ...,
|
||||
label: Any | None = ...,
|
||||
issuer: Any | None = ...,
|
||||
digits: Incomplete | None = ...,
|
||||
alg: Incomplete | None = ...,
|
||||
size: Incomplete | None = ...,
|
||||
period: Incomplete | None = ...,
|
||||
label: Incomplete | None = ...,
|
||||
issuer: Incomplete | None = ...,
|
||||
changed: bool = ...,
|
||||
**kwds,
|
||||
) -> None: ...
|
||||
@@ -79,21 +80,23 @@ class TOTP:
|
||||
@classmethod
|
||||
def normalize_time(cls, time): ...
|
||||
def normalize_token(self_or_cls, token): ...
|
||||
def generate(self, time: Any | None = ...): ...
|
||||
def generate(self, time: Incomplete | None = ...): ...
|
||||
@classmethod
|
||||
def verify(cls, token, source, **kwds): ...
|
||||
def match(self, token, time: Any | None = ..., window: int = ..., skew: int = ..., last_counter: Any | None = ...): ...
|
||||
def match(
|
||||
self, token, time: Incomplete | None = ..., window: int = ..., skew: int = ..., last_counter: Incomplete | None = ...
|
||||
): ...
|
||||
@classmethod
|
||||
def from_source(cls, source): ...
|
||||
@classmethod
|
||||
def from_uri(cls, uri): ...
|
||||
def to_uri(self, label: Any | None = ..., issuer: Any | None = ...): ...
|
||||
def to_uri(self, label: Incomplete | None = ..., issuer: Incomplete | None = ...): ...
|
||||
@classmethod
|
||||
def from_json(cls, source): ...
|
||||
def to_json(self, encrypt: Any | None = ...): ...
|
||||
def to_json(self, encrypt: Incomplete | None = ...): ...
|
||||
@classmethod
|
||||
def from_dict(cls, source): ...
|
||||
def to_dict(self, encrypt: Any | None = ...): ...
|
||||
def to_dict(self, encrypt: Incomplete | None = ...): ...
|
||||
|
||||
class TotpToken(SequenceMixin):
|
||||
totp: Any
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import timeit
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from hmac import compare_digest
|
||||
from typing import Any
|
||||
@@ -52,7 +53,7 @@ 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: Any | None = ...): ...
|
||||
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 = ...): ...
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
BASE64_CHARS: Any
|
||||
@@ -10,7 +11,7 @@ UPPER_HEX_CHARS: Any
|
||||
LOWER_HEX_CHARS: Any
|
||||
ALL_BYTE_VALUES: Any
|
||||
|
||||
def compile_byte_translation(mapping, source: Any | None = ...): ...
|
||||
def compile_byte_translation(mapping, source: Incomplete | None = ...): ...
|
||||
def b64s_encode(data): ...
|
||||
def b64s_decode(data): ...
|
||||
def ab64_encode(data): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
@@ -17,10 +18,10 @@ class OrderedDict(dict[Any, Any]):
|
||||
def iteritems(self) -> Generator[Any, None, None]: ...
|
||||
def update(*args, **kwds) -> None: ... # type: ignore[override]
|
||||
def pop(self, key, default=...): ...
|
||||
def setdefault(self, key, default: Any | None = ...): ...
|
||||
def setdefault(self, key, default: Incomplete | None = ...): ...
|
||||
def __reduce__(self): ...
|
||||
def copy(self): ...
|
||||
@classmethod
|
||||
def fromkeys(cls, iterable, value: Any | None = ...): ...
|
||||
def fromkeys(cls, iterable, value: Incomplete | None = ...): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class classproperty:
|
||||
@@ -21,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: Any | None = ...): ...
|
||||
def peek_cache(self, obj, default: Incomplete | None = ...): ...
|
||||
|
||||
def deprecated_function(
|
||||
msg: Any | None = ...,
|
||||
deprecated: Any | None = ...,
|
||||
removed: Any | None = ...,
|
||||
msg: Incomplete | None = ...,
|
||||
deprecated: Incomplete | None = ...,
|
||||
removed: Incomplete | None = ...,
|
||||
updoc: bool = ...,
|
||||
replacement: Any | None = ...,
|
||||
replacement: Incomplete | None = ...,
|
||||
_is_method: bool = ...,
|
||||
func_module: Any | None = ...,
|
||||
func_module: Incomplete | None = ...,
|
||||
): ...
|
||||
def deprecated_method(
|
||||
msg: Any | None = ...,
|
||||
deprecated: Any | None = ...,
|
||||
removed: Any | None = ...,
|
||||
msg: Incomplete | None = ...,
|
||||
deprecated: Incomplete | None = ...,
|
||||
removed: Incomplete | None = ...,
|
||||
updoc: bool = ...,
|
||||
replacement: Any | None = ...,
|
||||
replacement: Incomplete | None = ...,
|
||||
): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import abc
|
||||
from _typeshed import Self
|
||||
from _typeshed import Incomplete, Self
|
||||
from typing import Any, ClassVar
|
||||
|
||||
from passlib.ifc import PasswordHash
|
||||
@@ -11,8 +11,10 @@ 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: Any | None = ...): ...
|
||||
def parse_mc3(hash, prefix, sep=..., rounds_base: int = ..., default_rounds: Any | None = ..., handler: Any | None = ...): ...
|
||||
def parse_mc2(hash, prefix, sep=..., handler: Incomplete | None = ...): ...
|
||||
def parse_mc3(
|
||||
hash, prefix, sep=..., rounds_base: int = ..., default_rounds: Incomplete | None = ..., handler: Incomplete | None = ...
|
||||
): ...
|
||||
def render_mc2(ident, salt, checksum, sep=...): ...
|
||||
def render_mc3(ident, rounds, salt, checksum, sep=..., rounds_base: int = ...): ...
|
||||
|
||||
@@ -65,13 +67,13 @@ class HasEncodingContext(GenericHandler):
|
||||
|
||||
class HasUserContext(GenericHandler):
|
||||
user: Any | None
|
||||
def __init__(self, user: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, user: Incomplete | None = ..., **kwds) -> None: ...
|
||||
@classmethod
|
||||
def hash(cls, secret, user: Any | None = ..., **context): ...
|
||||
def hash(cls, secret, user: Incomplete | None = ..., **context): ...
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, user: Any | None = ..., **context): ...
|
||||
def verify(cls, secret, hash, user: Incomplete | None = ..., **context): ...
|
||||
@classmethod
|
||||
def genhash(cls, secret, config, user: Any | None = ..., **context): ...
|
||||
def genhash(cls, secret, config, user: Incomplete | None = ..., **context): ...
|
||||
|
||||
class HasRawChecksum(GenericHandler): ...
|
||||
|
||||
@@ -81,8 +83,8 @@ class HasManyIdents(GenericHandler):
|
||||
ident_aliases: ClassVar[dict[str, str] | None]
|
||||
ident: str # type: ignore[misc]
|
||||
@classmethod
|
||||
def using(cls, default_ident: Any | None = ..., ident: Any | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, ident: Any | None = ..., **kwds) -> None: ...
|
||||
def using(cls, default_ident: Incomplete | None = ..., ident: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, ident: Incomplete | None = ..., **kwds) -> None: ...
|
||||
|
||||
class HasSalt(GenericHandler):
|
||||
min_salt_size: ClassVar[int]
|
||||
@@ -113,24 +115,24 @@ class HasRounds(GenericHandler):
|
||||
@classmethod
|
||||
def using( # type: ignore[override]
|
||||
cls,
|
||||
min_desired_rounds: Any | None = ...,
|
||||
max_desired_rounds: Any | None = ...,
|
||||
default_rounds: Any | None = ...,
|
||||
vary_rounds: Any | None = ...,
|
||||
min_rounds: Any | None = ...,
|
||||
max_rounds: Any | None = ...,
|
||||
rounds: Any | None = ...,
|
||||
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 = ...,
|
||||
**kwds,
|
||||
): ...
|
||||
def __init__(self, rounds: Any | None = ..., **kwds) -> None: ...
|
||||
def __init__(self, rounds: Incomplete | None = ..., **kwds) -> None: ...
|
||||
@classmethod
|
||||
def bitsize(cls, rounds: Any | None = ..., vary_rounds: float = ..., **kwds): ...
|
||||
def bitsize(cls, rounds: Incomplete | None = ..., vary_rounds: float = ..., **kwds): ...
|
||||
|
||||
class ParallelismMixin(GenericHandler):
|
||||
parallelism: int
|
||||
@classmethod
|
||||
def using(cls, parallelism: Any | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, parallelism: Any | None = ..., **kwds) -> None: ...
|
||||
def using(cls, parallelism: Incomplete | None = ..., **kwds): ... # type: ignore[override]
|
||||
def __init__(self, parallelism: Incomplete | None = ..., **kwds) -> None: ...
|
||||
|
||||
class BackendMixin(PasswordHash, metaclass=abc.ABCMeta):
|
||||
backends: ClassVar[tuple[str, ...] | None]
|
||||
@@ -150,7 +152,14 @@ class PrefixWrapper:
|
||||
orig_prefix: Any
|
||||
__doc__: Any
|
||||
def __init__(
|
||||
self, name, wrapped, prefix=..., orig_prefix=..., lazy: bool = ..., doc: Any | None = ..., ident: Any | None = ...
|
||||
self,
|
||||
name,
|
||||
wrapped,
|
||||
prefix=...,
|
||||
orig_prefix=...,
|
||||
lazy: bool = ...,
|
||||
doc: Incomplete | None = ...,
|
||||
ident: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def wrapped(self): ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import Any
|
||||
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: Any | None = ..., hash: str = ...): ...
|
||||
def pbkdf2(secret, salt, rounds, keylen: Any | None = ..., prf: str = ...): ...
|
||||
def pbkdf1(secret, salt, rounds, keylen: Incomplete | None = ..., hash: str = ...): ...
|
||||
def pbkdf2(secret, salt, rounds, keylen: Incomplete | None = ..., prf: str = ...): ...
|
||||
|
||||
Reference in New Issue
Block a user