From f87d2d81e67ac340e2e2dc03d6659f1c55f0561e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Wed, 27 Dec 2023 15:26:06 +0000 Subject: [PATCH] chore: added base auth types --- src/netius/auth/base.pyi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/netius/auth/base.pyi b/src/netius/auth/base.pyi index bbd9894a..5659fae8 100644 --- a/src/netius/auth/base.pyi +++ b/src/netius/auth/base.pyi @@ -1,25 +1,25 @@ -from typing import Any, Literal, NoReturn, PathLike, Unbound +from typing import Any, Literal, NoReturn, PathLike HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"] class Auth: def __init__(self, *args, **kwargs) -> None: ... @classmethod - def auth(cls, *args, **kwargs) -> NoReturn: ... + def auth(cls, *args, **kwargs) -> bool: ... @classmethod - def meta(cls, *args, **kwargs) -> dict: ... + def meta(cls, *args, **kwargs) -> dict[str, Any]: ... @classmethod - def auth_assert(cls, *args, **kwargs) -> None: ... + def auth_assert(cls, *args, **kwargs) -> NoReturn: ... @classmethod def verify(cls, encoded: str, decoded: str) -> bool: ... @classmethod def generate(cls, password: str, type: HashType = ..., salt: str = ...) -> str: ... @classmethod - def unpack(cls, password) -> tuple[Any | Literal["plain"], bytes | Any | str | None, Any | None, Unbound | Any | None]: ... + def unpack(cls, password) -> tuple[HashType, str | None, str, str | None]: ... @classmethod - def get_file(cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ...) -> (Any | str | bytes): ... + def get_file(cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ...) -> str | bytes: ... @classmethod def is_simple(cls) -> bool: ... - def auth_i(self, *args, **kwargs) -> NoReturn: ... - def auth_assert_i(self, *args, **kwargs) -> None: ... - def is_simple_i(self) -> Literal[False]: ... + def auth_i(self, *args, **kwargs) -> bool: ... + def auth_assert_i(self, *args, **kwargs) -> NoReturn: ... + def is_simple_i(self) -> bool: ...