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

@@ -24,9 +24,6 @@ import os
import asyncio
import platform
from typing import List
from typing import Dict
from ....logging import get_logger
from .... import aioproc
@@ -38,10 +35,10 @@ from .base import BaseInfoSubmanager
# =====
class SystemInfoSubmanager(BaseInfoSubmanager):
def __init__(self, streamer_cmd: List[str]) -> None:
def __init__(self, streamer_cmd: list[str]) -> None:
self.__streamer_cmd = streamer_cmd
async def get_state(self) -> Dict:
async def get_state(self) -> dict:
streamer_info = await self.__get_streamer_info()
uname_info = platform.uname() # Uname using the internal cache
return {
@@ -55,9 +52,9 @@ class SystemInfoSubmanager(BaseInfoSubmanager):
# =====
async def __get_streamer_info(self) -> Dict:
async def __get_streamer_info(self) -> dict:
version = ""
features: Dict[str, bool] = {}
features: dict[str, bool] = {}
try:
path = self.__streamer_cmd[0]
((_, version), (_, features_text)) = await asyncio.gather(