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

@@ -23,8 +23,6 @@
import importlib
import functools
from typing import Dict
from typing import Type
from typing import Any
@@ -44,12 +42,12 @@ class BasePlugin:
return name[name.rindex(".") + 1:]
@classmethod
def get_plugin_options(cls) -> Dict:
def get_plugin_options(cls) -> dict:
return {} # pragma: nocover
@functools.lru_cache()
def get_plugin_class(sub: str, name: str) -> Type[BasePlugin]:
def get_plugin_class(sub: str, name: str) -> type[BasePlugin]:
assert sub
assert name
if name.startswith("_"):