From 6740de227b412aec1504982f0187cd56546c0247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Wed, 27 Dec 2023 15:18:54 +0000 Subject: [PATCH] chore: more simplification --- src/netius/auth/address.pyi | 3 --- src/netius/auth/allow.pyi | 12 +++--------- src/netius/auth/base.pyi | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/netius/auth/address.pyi b/src/netius/auth/address.pyi index cc98cf64..79f5fcab 100644 --- a/src/netius/auth/address.pyi +++ b/src/netius/auth/address.pyi @@ -4,6 +4,3 @@ class AddressAuth(Auth): def __init__(self, allowed: list[str] = ..., *args, **kwargs) -> None: ... @classmethod def auth(cls, allowed: list[str] = ..., *args, **kwargs) -> bool: ... - @classmethod - def is_simple(cls) -> bool: ... - def auth_i(self, *args, **kwargs) -> bool: ... diff --git a/src/netius/auth/allow.pyi b/src/netius/auth/allow.pyi index 35c50d8d..83f67b0a 100644 --- a/src/netius/auth/allow.pyi +++ b/src/netius/auth/allow.pyi @@ -1,10 +1,4 @@ -import netius.auth.base -import netius.auth.base as base +from netius import Auth -from typing import Literal - -class AllowAuth(netius.auth.base.Auth): - @classmethod - def auth(cls, *args, **kwargs) -> Literal[True]: ... - @classmethod - def is_simple(cls) -> Literal[True]: ... +class AllowAuth(Auth): + pass diff --git a/src/netius/auth/base.pyi b/src/netius/auth/base.pyi index 24703f85..bbd9894a 100644 --- a/src/netius/auth/base.pyi +++ b/src/netius/auth/base.pyi @@ -19,7 +19,7 @@ class Auth: @classmethod def get_file(cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ...) -> (Any | str | bytes): ... @classmethod - def is_simple(cls) -> Literal[False]: ... + 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]: ...