diff options
author | Maxim Devaev <[email protected]> | 2022-09-04 18:08:40 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-09-04 18:08:40 +0300 |
commit | ee3e224e396494cd0d69bb6167087a071a20349c (patch) | |
tree | 5becd28570e58a03c6e1e231d0db24c264a73f88 /kvmd/clients/streamer.py | |
parent | 4b75221e9470b4a009955d7677f16adf8e23e302 (diff) |
new typing style
Diffstat (limited to 'kvmd/clients/streamer.py')
-rw-r--r-- | kvmd/clients/streamer.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kvmd/clients/streamer.py b/kvmd/clients/streamer.py index dd4167f9..f26fed1e 100644 --- a/kvmd/clients/streamer.py +++ b/kvmd/clients/streamer.py @@ -22,7 +22,6 @@ import types -from typing import Dict from typing import AsyncGenerator import aiohttp @@ -61,7 +60,7 @@ class BaseStreamerClient: def get_format(self) -> int: raise NotImplementedError() - async def read_stream(self) -> AsyncGenerator[Dict, None]: + async def read_stream(self) -> AsyncGenerator[dict, None]: if self is not None: # XXX: Vulture and pylint hack raise NotImplementedError() yield @@ -84,7 +83,7 @@ class HttpStreamerClient(BaseStreamerClient): def get_format(self) -> int: return StreamFormats.JPEG - async def read_stream(self) -> AsyncGenerator[Dict, None]: + async def read_stream(self) -> AsyncGenerator[dict, None]: try: async with self.__make_http_session() as session: async with session.get( @@ -118,7 +117,7 @@ class HttpStreamerClient(BaseStreamerClient): raise StreamerTempError("Reached EOF") def __make_http_session(self) -> aiohttp.ClientSession: - kwargs: Dict = { + kwargs: dict = { "headers": {"User-Agent": self.__user_agent}, "connector": aiohttp.UnixConnector(path=self.__unix_path), "timeout": aiohttp.ClientTimeout( @@ -162,7 +161,7 @@ class MemsinkStreamerClient(BaseStreamerClient): self.__name = name self.__fmt = fmt - self.__kwargs: Dict = { + self.__kwargs: dict = { "obj": obj, "lock_timeout": lock_timeout, "wait_timeout": wait_timeout, @@ -172,7 +171,7 @@ class MemsinkStreamerClient(BaseStreamerClient): def get_format(self) -> int: return self.__fmt - async def read_stream(self) -> AsyncGenerator[Dict, None]: + async def read_stream(self) -> AsyncGenerator[dict, None]: if ustreamer is None: raise StreamerPermError("Missing ustreamer library") try: |