Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deploy] Deploy v1.0.1 #14

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Using `@decorator` to easily request an HTTP Client<br/>
This framework based on [aiohttp](https://github.com/aio-libs/aiohttp)'s http client framework.<br/>

Use Union Type to describe the elements required in an HTTP request.
Use Annotated Type to describe the elements required in an HTTP request.


## Installation
Expand All @@ -25,7 +25,7 @@ An example is the API provided by the [BUS API](https://github.com/gunyu1019/tra
import asyncio
import aiohttp
from ahttp_client import request, Session, Query
from typing import Any
from typing import Annotated, Any

loop = asyncio.get_event_loop()

Expand All @@ -38,7 +38,7 @@ class MetroAPI(Session):
async def station_search_with_query(
self,
response: aiohttp.ClientResponse,
name: Query | str
name: Annotated[str, Query]
) -> dict[str, Any]:
return await response.json()

Expand Down
4 changes: 2 additions & 2 deletions ahttp_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
__author__ = "gunyu1019"
__license__ = "MIT"
__copyright__ = "Copyright 2023-present gunyu1019"
__version__ = "1.0.0" # version_info.to_string()
__version__ = "1.0.1" # version_info.to_string()


class VersionInfo(NamedTuple):
Expand All @@ -53,4 +53,4 @@ def to_string(self) -> str:
return _version_info


version_info: VersionInfo = VersionInfo(major=1, minor=0, micro=0, release_level=None, serial=0)
version_info: VersionInfo = VersionInfo(major=1, minor=0, micro=1, release_level=None, serial=0)
4 changes: 2 additions & 2 deletions ahttp_client/extension.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import inspect
from collections.abc import Iterable
from collections.abc import Sequence
from types import GenericAlias
from typing import overload, TYPE_CHECKING, TypeVar

Expand Down Expand Up @@ -139,7 +139,7 @@ def _parsing_json_to_model(
from_attributes: Optional[bool] = None,
context: Optional[dict[str, Any]] = None,
) -> BaseModelT:
if isinstance(data, Iterable):
if isinstance(data, Sequence):
validated_data = [
model.model_validate(
obj=x,
Expand Down
Loading