Skip to content

Commit

Permalink
fix typo in BringAuthTokenResponse naming (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
miaucl authored Sep 18, 2024
1 parent 86f6027 commit 5f2cbac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bring_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)
from .types import (
BringAuthResponse,
BringAuthTokenRespone,
BringAuthTokenResponse,
BringItem,
BringItemOperation,
BringItemsResponse,
Expand All @@ -30,7 +30,7 @@
"Bring",
"BringAuthException",
"BringAuthResponse",
"BringAuthTokenRespone",
"BringAuthTokenResponse",
"BringEMailInvalidException",
"BringItem",
"BringItemOperation",
Expand Down
8 changes: 4 additions & 4 deletions bring_api/bring.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
)
from .types import (
BringAuthResponse,
BringAuthTokenRespone,
BringAuthTokenResponse,
BringItem,
BringItemOperation,
BringItemsResponse,
Expand Down Expand Up @@ -1419,7 +1419,7 @@ async def batch_update_list(

async def retrieve_new_access_token(
self, refresh_token: str | None = None
) -> BringAuthTokenRespone:
) -> BringAuthTokenResponse:
"""Refresh the access token.
Parameters
Expand Down Expand Up @@ -1481,11 +1481,11 @@ async def retrieve_new_access_token(

try:
data = cast(
BringAuthTokenRespone,
BringAuthTokenResponse,
{
key: val
for key, val in (await r.json()).items()
if key in BringAuthTokenRespone.__annotations__
if key in BringAuthTokenResponse.__annotations__
},
)
except JSONDecodeError as e:
Expand Down
2 changes: 1 addition & 1 deletion bring_api/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class BringItem(TypedDict):
]


class BringAuthTokenRespone(TypedDict):
class BringAuthTokenResponse(TypedDict):
"""A refresh token response class."""

access_token: str
Expand Down

0 comments on commit 5f2cbac

Please sign in to comment.