new typing style

This commit is contained in:
Maxim Devaev
2022-09-04 18:08:40 +03:00
parent 4b75221e94
commit ee3e224e39
129 changed files with 593 additions and 941 deletions

View File

@@ -20,9 +20,7 @@
# ========================================================================== #
from typing import Dict
from typing import AsyncGenerator
from typing import Type
from ...errors import OperationError
from ...errors import IsBusyError
@@ -47,10 +45,10 @@ class AtxIsBusyError(IsBusyError, AtxError):
# =====
class BaseAtx(BasePlugin):
async def get_state(self) -> Dict:
async def get_state(self) -> dict:
raise NotImplementedError
async def poll_state(self) -> AsyncGenerator[Dict, None]:
async def poll_state(self) -> AsyncGenerator[dict, None]:
yield {}
raise NotImplementedError
@@ -84,5 +82,5 @@ class BaseAtx(BasePlugin):
# =====
def get_atx_class(name: str) -> Type[BaseAtx]:
def get_atx_class(name: str) -> type[BaseAtx]:
return get_plugin_class("atx", name) # type: ignore