🚨 Add specific ignore items in pyright ignore

🚨 Make pyright happy
♻️ Remove unused adapter
This commit is contained in:
HibiKier
2025-01-10 12:19:11 +08:00
committed by BalconyJH
parent e814469b75
commit ccee16bed2
33 changed files with 53 additions and 51 deletions
@@ -206,6 +206,8 @@ class Manager:
返回:
list: 消息内容
"""
if not session.group:
return None
json_data = cls.__get_data(session)
if not json_data:
return None
+1 -1
View File
@@ -23,7 +23,7 @@ ARM_KEY = "aarch64"
@dataclass
class CPUInfo:
core: int
core: int | None
"""CPU 物理核心数"""
usage: float
"""CPU 占用百分比,取值范围(0,100]"""
@@ -1,3 +1,5 @@
from typing import ClassVar
from nonebot.adapters import Bot, Event
from nonebot.adapters.onebot.v11 import PokeNotifyEvent
from nonebot.exception import IgnoredException
@@ -38,11 +40,11 @@ class Limit(BaseModel):
class LimitManage:
add_module = [] # noqa: RUF012
add_module: ClassVar[list] = []
cd_limit: dict[str, Limit] = {} # noqa: RUF012
block_limit: dict[str, Limit] = {} # noqa: RUF012
count_limit: dict[str, Limit] = {} # noqa: RUF012
cd_limit: ClassVar[dict[str, Limit]] = {}
block_limit: ClassVar[dict[str, Limit]] = {}
count_limit: ClassVar[dict[str, Limit]] = {}
@classmethod
def add_limit(cls, limit: PluginLimit):
+3 -1
View File
@@ -16,7 +16,9 @@ except ImportError:
try:
from nonebot.adapters.qq import Bot # noqa: F401
from nonebot.adapters.qq import ( # noqa: F401 # pyright: ignore [reportMissingImports]
Bot,
)
nonebot.load_plugins(str((path / "qq_api").resolve()))
except ImportError:
@@ -17,7 +17,7 @@ class SqlLog(Model):
create_time = fields.DatetimeField(auto_now_add=True)
"""创建时间"""
class Meta: # type: ignore
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
table = "sql_log"
table_description = "sql执行日志"