mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
new typing style
This commit is contained in:
@@ -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("_"):
|
||||
|
||||
Reference in New Issue
Block a user