diff --git a/src/netius/adapters/memory.pyi b/src/netius/adapters/memory.pyi index 184f59b2..f2678d7d 100644 --- a/src/netius/adapters/memory.pyi +++ b/src/netius/adapters/memory.pyi @@ -1,8 +1,8 @@ -from typing import Any, BinaryIO, Callable +from typing import Any, BinaryIO, Callable, Mapping from netius import BaseAdapter class MemoryAdapter(BaseAdapter): def __init__(self): ... - def _ensure(self, owner: str) -> dict[str, Any]: ... + def _ensure(self, owner: str) -> Mapping[str, Any]: ... def _build_close(self, file: BinaryIO, key: str) -> Callable[[], None]: ... diff --git a/src/netius/auth/base.pyi b/src/netius/auth/base.pyi index 2af5c2ba..d9d8133b 100644 --- a/src/netius/auth/base.pyi +++ b/src/netius/auth/base.pyi @@ -1,4 +1,4 @@ -from typing import Any, Literal, NoReturn, PathLike +from typing import Any, Literal, Mapping, NoReturn, PathLike HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"] @@ -7,7 +7,7 @@ class Auth: @classmethod def auth(cls, *args, **kwargs) -> bool: ... @classmethod - def meta(cls, *args, **kwargs) -> dict[str, Any]: ... + def meta(cls, *args, **kwargs) -> Mapping[str, Any]: ... @classmethod def auth_assert(cls, *args, **kwargs) -> NoReturn: ... @classmethod diff --git a/src/netius/auth/memory.pyi b/src/netius/auth/memory.pyi index 6233f85f..3ff73f09 100644 --- a/src/netius/auth/memory.pyi +++ b/src/netius/auth/memory.pyi @@ -1,25 +1,23 @@ -from typing import Any +from typing import Any, Mapping from netius import Auth class MemoryAuth(Auth): - def __init__( - self, registry: dict[str, Any] | None = ..., *args, **kwargs - ): ... + def __init__(self, registry: Mapping[str, Any] | None = ..., *args, **kwargs): ... @classmethod def auth( cls, username: str, password: str, - registry: dict[str, Any] | None = ..., + registry: Mapping[str, Any] | None = ..., *args, **kwargs ) -> bool: ... @classmethod def meta( - cls, username: str, registry: dict[str, Any] | None = ..., *args, **kwargs - ) -> dict[str, Any]: ... + cls, username: str, registry: Mapping[str, Any] | None = ..., *args, **kwargs + ) -> Mapping[str, Any]: ... @classmethod - def get_registry(cls) -> dict[str, Any]: ... + def get_registry(cls) -> Mapping[str, Any]: ... @classmethod - def load_registry(cls) -> dict[str, Any]: ... + def load_registry(cls) -> Mapping[str, Any]: ... diff --git a/src/netius/auth/passwd.pyi b/src/netius/auth/passwd.pyi index 6aa3ebc0..ccfff7a9 100644 --- a/src/netius/auth/passwd.pyi +++ b/src/netius/auth/passwd.pyi @@ -1,4 +1,4 @@ -from typing import PathLike +from typing import Mapping, PathLike from netius import Auth @@ -9,5 +9,7 @@ class PasswdAuth(Auth): cls, username: str, password: str, path: str = ..., *args, **kwargs ) -> bool: ... @classmethod - def get_passwd(cls, path: PathLike[str], cache: bool = ...) -> dict[str, str]: ... + def get_passwd( + cls, path: PathLike[str], cache: bool = ... + ) -> Mapping[str, str]: ... def auth_i(self, username: str, password: str, *args, **kwargs) -> bool: ...