Skip to content

Commit

Permalink
Merge branch 'dev/3.0' of https://github.com/PythonistaGuild/TwitchIO
Browse files Browse the repository at this point in the history
…into dev/3.0
  • Loading branch information
EvieePy committed May 13, 2024
2 parents 3272d3e + 87b3359 commit 4861d67
Show file tree
Hide file tree
Showing 32 changed files with 8,409 additions and 1,731 deletions.
12 changes: 12 additions & 0 deletions docs/references/models.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Twitchio Models

::: twitchio.ExtensionAnalytics
options:
show_root_heading: true

::: twitchio.GameAnalytics
options:
show_root_heading: true

::: twitchio.Game
options:
show_root_heading: true

::: twitchio.Video
options:
show_root_heading: true
2 changes: 1 addition & 1 deletion twitchio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
from .assets import Asset as Asset
from .client import Client as Client
from .exceptions import *
from .models import Game as Game
from .models import *
from .payloads import *
from .utils import Color as Color, Colour as Colour
4 changes: 2 additions & 2 deletions twitchio/authentication/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _find_token(self, route: Route) -> TokenMappingData | None | str:

return token or self._app_token

async def request(self, route: Route) -> RawResponse | str:
async def request(self, route: Route) -> RawResponse | str | None:
if not self._session:
await self._init_session()

Expand All @@ -167,7 +167,7 @@ async def request(self, route: Route) -> RawResponse | str:
route.update_headers({"Authorization": f"Bearer {token}"})

try:
data: RawResponse | str = await super().request(route)
data: RawResponse | str | None = await super().request(route)
except HTTPException as e:
if not old or e.status != 401:
raise e
Expand Down

0 comments on commit 4861d67

Please sign in to comment.