Skip to content

Commit

Permalink
expose public from json util
Browse files Browse the repository at this point in the history
  • Loading branch information
AbstractUmbra committed Oct 29, 2023
1 parent 772dcb5 commit 7ceade1
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions hondana/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class SupportsHTTP(Protocol):
_http: HTTPClient


from_json = _from_json


MANGADEX_QUERY_PARAM_TYPE: TypeAlias = dict[
str, Optional[Union[str, int, bool, list[str], list["LanguageCode"], dict[str, str]]]
]
Expand Down Expand Up @@ -115,6 +118,7 @@ class SupportsHTTP(Protocol):
"RelationshipResolver",
"clean_isoformat",
"MANGA_TAGS",
"from_json",
)

_PROJECT_DIR = pathlib.Path(__file__)
Expand Down Expand Up @@ -220,15 +224,7 @@ class AuthRoute(Route):
making ``"manga/..."``
"""

BASE: ClassVar[str] = "https://auth.mangadex.dev/realms/mangadex/protocol/openid-connect"

def __init__(self, verb: str, path: str, **parameters: Any) -> None:
self.verb: str = verb
self.path: str = path
url = self.BASE + self.path
if parameters:
url = url.format_map({k: _uriquote(v) if isinstance(v, str) else v for k, v in parameters.items()})
self.url: URL = URL(url, encoded=True)
BASE: ClassVar[str] = "https://auth.mangadex.org/realms/mangadex/protocol/openid-connect"


class MissingSentinel:
Expand Down

0 comments on commit 7ceade1

Please sign in to comment.