From df0a062b34272a71634235a4e34a87d752b03070 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Tue, 29 Nov 2022 15:07:17 +0300 Subject: [PATCH] Mark `passlib` as completed (#9302) --- stubs/passlib/@tests/stubtest_allowlist.txt | 17 +++++++++++++++++ stubs/passlib/METADATA.toml | 3 +++ stubs/passlib/passlib/handlers/digests.pyi | 2 ++ stubs/passlib/passlib/handlers/misc.pyi | 4 ++++ 4 files changed, 26 insertions(+) diff --git a/stubs/passlib/@tests/stubtest_allowlist.txt b/stubs/passlib/@tests/stubtest_allowlist.txt index 42d21cc1c..1954308b8 100644 --- a/stubs/passlib/@tests/stubtest_allowlist.txt +++ b/stubs/passlib/@tests/stubtest_allowlist.txt @@ -34,3 +34,20 @@ passlib.utils.handlers.GenericHandler.setting_kwds # set to None on class level, but initialized in __init__ passlib.utils.handlers.HasManyIdents.ident passlib.utils.handlers.HasRounds.rounds + +# Errors in `__all__` at runtime: +# TODO: change after https://github.com/python/mypy/pull/14217 is released +passlib.handlers.oracle +passlib.handlers.oracle.oracle11g +passlib.handlers.oracle.oracle10g +passlib.handlers.mysql +passlib.handlers.mysql.mysq41 + +# Mutable state because of the warnigns: +passlib.utils.des.__warningregistry__ + +# Compat tools are ignored: +passlib.utils.compat.* + +# Tests are not included: +passlib.tests.* diff --git a/stubs/passlib/METADATA.toml b/stubs/passlib/METADATA.toml index ef7966007..b32ddc518 100644 --- a/stubs/passlib/METADATA.toml +++ b/stubs/passlib/METADATA.toml @@ -1 +1,4 @@ version = "1.7.*" + +[tool.stubtest] +ignore_missing_stub = false diff --git a/stubs/passlib/passlib/handlers/digests.pyi b/stubs/passlib/passlib/handlers/digests.pyi index a0c9f7e23..a594112a7 100644 --- a/stubs/passlib/passlib/handlers/digests.pyi +++ b/stubs/passlib/passlib/handlers/digests.pyi @@ -17,6 +17,8 @@ hex_sha512: Any class htdigest(uh.MinimalHandler): name: ClassVar[str] default_encoding: ClassVar[str] + setting_kwds: ClassVar[tuple[str, ...]] + context_kwds: ClassVar[tuple[str, ...]] @classmethod def hash(cls, secret, user, realm, encoding: Any | None = ...): ... # type: ignore[override] @classmethod diff --git a/stubs/passlib/passlib/handlers/misc.pyi b/stubs/passlib/passlib/handlers/misc.pyi index 4e153913b..424255af1 100644 --- a/stubs/passlib/passlib/handlers/misc.pyi +++ b/stubs/passlib/passlib/handlers/misc.pyi @@ -15,6 +15,8 @@ class unix_fallback(DisabledHash, uh.StaticHandler): class unix_disabled(DisabledHash, uh.MinimalHandler): name: ClassVar[str] default_marker: ClassVar[str] + setting_kwds: ClassVar[tuple[str, ...]] + context_kwds: ClassVar[tuple[str, ...]] @classmethod def using(cls, marker: Any | None = ..., **kwds): ... # type: ignore[override] @classmethod @@ -33,6 +35,8 @@ class unix_disabled(DisabledHash, uh.MinimalHandler): class plaintext(uh.MinimalHandler): name: ClassVar[str] default_encoding: ClassVar[str] + setting_kwds: ClassVar[tuple[str, ...]] + context_kwds: ClassVar[tuple[str, ...]] @classmethod def identify(cls, hash: str | bytes): ... @classmethod