Skip to content

Commit

Permalink
Update Mapping type in conduit pool.
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Apr 17, 2024
1 parent 3aaa333 commit 67c8e25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions twitchio/conduits/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

if TYPE_CHECKING:
import datetime
from collections.abc import Mapping

from typing_extensions import Self

Expand Down Expand Up @@ -133,7 +134,7 @@ def __init__(self, *, client: Client | Bot) -> None:
self._conduits: dict[str, Conduit] = {}

@property
def conduits(self) -> MappingProxyType[str, Conduit]:
def conduits(self) -> Mapping[str, Conduit]:
return MappingProxyType(self._conduits) # thanks lilly

async def create_conduit(self, shard_count: int, buffer: bool = False) -> list[Conduit]:
Expand All @@ -150,7 +151,7 @@ async def create_conduit(self, shard_count: int, buffer: bool = False) -> list[C

return conduits

async def fetch_conduits(self) -> MappingProxyType[str, Conduit]:
async def fetch_conduits(self) -> Mapping[str, Conduit]:
data = await self._client._http.get_conduits()
mapping: dict[str, Conduit] = {}

Expand Down

0 comments on commit 67c8e25

Please sign in to comment.