mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-07 12:36:47 +00:00
Improve Plugin class
This commit is contained in:
@ -1,12 +1,16 @@
|
|||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from collections import namedtuple
|
from typing import Any, Set, NamedTuple
|
||||||
from typing import Set
|
|
||||||
|
|
||||||
from .log import logger
|
from .log import logger
|
||||||
|
|
||||||
Plugin = namedtuple('Plugin', ['module', 'name', 'usage'])
|
|
||||||
|
class Plugin(NamedTuple):
|
||||||
|
module: Any
|
||||||
|
name: str = None
|
||||||
|
usage: str = None
|
||||||
|
|
||||||
|
|
||||||
_plugins: Set[Plugin] = set()
|
_plugins: Set[Plugin] = set()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user