Skip to content

Commit

Permalink
chore: removed base elements and ran black
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Dec 27, 2023
1 parent f87d2d8 commit 99087bd
Show file tree
Hide file tree
Showing 23 changed files with 54 additions and 1,484 deletions.
6 changes: 4 additions & 2 deletions src/netius/auth/address.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from typing import Sequence

from netius import Auth

class AddressAuth(Auth):
def __init__(self, allowed: list[str] = ..., *args, **kwargs) -> None: ...
def __init__(self, allowed: Sequence[str] = ..., *args, **kwargs) -> None: ...
@classmethod
def auth(cls, allowed: list[str] = ..., *args, **kwargs) -> bool: ...
def auth(cls, allowed: Sequence[str] = ..., *args, **kwargs) -> bool: ...
6 changes: 4 additions & 2 deletions src/netius/auth/base.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Literal, NoReturn, PathLike

HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"]
HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"]

class Auth:
def __init__(self, *args, **kwargs) -> None: ...
Expand All @@ -17,7 +17,9 @@ class Auth:
@classmethod
def unpack(cls, password) -> tuple[HashType, str | None, str, str | None]: ...
@classmethod
def get_file(cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ...) -> 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) -> bool: ...
Expand Down
12 changes: 3 additions & 9 deletions src/netius/auth/deny.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import netius.auth.base
import netius.auth.base as base
from netius import Auth

from typing import Literal

class DenyAuth(netius.auth.base.Auth):
@classmethod
def auth(cls, *args, **kwargs) -> Literal[False]: ...
@classmethod
def is_simple(cls) -> Literal[True]: ...
class DenyAuth(Auth):
pass
10 changes: 2 additions & 8 deletions src/netius/auth/dummy.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import netius.auth.base
import netius.auth.base as base
from netius import Auth

from typing import Literal

class DummyAuth(netius.auth.base.Auth):
class DummyAuth(Auth):
def __init__(self, value: bool = ..., *args, **kwargs) -> None: ...
@classmethod
def auth(cls, value: bool = ..., *args, **kwargs) -> bool: ...
@classmethod
def is_simple(cls) -> Literal[True]: ...
def auth_i(self, *args, **kwargs) -> bool: ...
30 changes: 19 additions & 11 deletions src/netius/auth/memory.pyi
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import netius as netius
import netius.auth.base
import netius.auth.base as base
from typing import Any

from typing import Dict
from netius import Auth

class MemoryAuth(netius.auth.base.Auth):
def __init__(self, registry: Dict | None = ..., *args, **kwargs) -> None: ...
class MemoryAuth(Auth):
def __init__(
self, registry: dict[str, Any] | None = ..., *args, **kwargs
) -> None: ...
@classmethod
def auth(cls, username: str, password: str, registry: dict | None = ..., *args, **kwargs) -> bool: ...
def auth(
cls,
username: str,
password: str,
registry: dict[str, Any] | None = ...,
*args,
**kwargs
) -> bool: ...
@classmethod
def meta(cls, username: str, registry: Dict | None = ..., *args, **kwargs) -> Dict: ...
def meta(
cls, username: str, registry: dict[str, Any] | None = ..., *args, **kwargs
) -> dict[str, Any]: ...
@classmethod
def get_registry(cls) -> Dict: ...
def get_registry(cls) -> dict[str, Any]: ...
@classmethod
def load_registry(cls) -> Dict: ...
def auth_i(self, username: str, password: str, *args, **kwargs) -> bool: ...
def load_registry(cls) -> dict[str, Any]: ...
13 changes: 7 additions & 6 deletions src/netius/auth/passwd.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import netius.auth.base
import netius.auth.base as base
from typing import PathLike

from typing import PathLike, Any, Dict
from netius import Auth

class PasswdAuth(netius.auth.base.Auth):
class PasswdAuth(Auth):
def __init__(self, path: PathLike[str] | None = ..., *args, **kwargs) -> None: ...
@classmethod
def auth(cls, username: str, password: str, path: str = ..., *args, **kwargs) -> bool: ...
def auth(
cls, username: str, password: str, path: str = ..., *args, **kwargs
) -> bool: ...
@classmethod
def get_passwd(cls, path: PathLike[str], cache: bool = ...) -> (Any | Dict): ...
def get_passwd(cls, path: PathLike[str], cache: bool = ...) -> dict[str, str]: ...
def auth_i(self, username: str, password: str, *args, **kwargs) -> bool: ...
22 changes: 15 additions & 7 deletions src/netius/auth/simple.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import netius.auth.base
import netius.auth.base as base
from typing import Sequence

from typing import Tuple
from netius import Auth

class SimpleAuth(netius.auth.base.Auth):
def __init__(self, username: str | None = ..., password: str | None = ..., *args, **kwargs) -> None: ...
class SimpleAuth(Auth):
def __init__(
self, username: str | None = ..., password: str | None = ..., *args, **kwargs
) -> None: ...
@classmethod
def auth(cls, username: str, password: str, target: Tuple[str:str] | None = ..., *args, **kwargs) -> bool: ...
def auth_i(self, username:str , password: str, *args, **kwargs) -> bool: ...
def auth(
cls,
username: str,
password: str,
target: Sequence[str, str] | None = ...,
*args,
**kwargs
) -> bool: ...
def auth_i(self, username: str, password: str, *args, **kwargs) -> bool: ...
20 changes: 0 additions & 20 deletions src/netius/base/agent.pyi

This file was deleted.

43 changes: 0 additions & 43 deletions src/netius/base/async_neo.pyi

This file was deleted.

68 changes: 0 additions & 68 deletions src/netius/base/async_old.pyi

This file was deleted.

31 changes: 0 additions & 31 deletions src/netius/base/asynchronous.pyi

This file was deleted.

Loading

0 comments on commit 99087bd

Please sign in to comment.