mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-05 03:39:59 +08:00
🚨 Add specific ignore items in pyright ignore
🚨 Make pyright happy ♻️ Remove unused adapter
This commit is contained in:
@@ -25,7 +25,7 @@ class BagUser(Model):
|
||||
property: dict[str, int] = fields.JSONField(default={}) # type: ignore
|
||||
"""道具"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "bag_users"
|
||||
table_description = "用户道具数据表"
|
||||
unique_together = ("user_id", "group_id")
|
||||
|
||||
@@ -24,7 +24,7 @@ class BanConsole(Model):
|
||||
operator = fields.CharField(255)
|
||||
"""使用Ban命令的用户"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "ban_console"
|
||||
table_description = "封禁人员/群组数据表"
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ class BotConnectLog(Model):
|
||||
create_time = fields.DatetimeField(auto_now_add=True)
|
||||
"""创建时间"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "bot_connect_log"
|
||||
table_description = "bot连接表"
|
||||
|
||||
@@ -25,7 +25,7 @@ class BotConsole(Model):
|
||||
available_tasks = fields.TextField(default="", description="可用被动技能")
|
||||
"""可用被动技能"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "bot_console"
|
||||
table_description = "Bot数据表"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class ChatHistory(Model):
|
||||
platform = fields.CharField(255, null=True)
|
||||
"""平台"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "chat_history"
|
||||
table_description = "聊天记录数据表"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class FgRequest(Model):
|
||||
)
|
||||
"""处理类型"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "fg_request"
|
||||
table_description = "好友群组请求"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class FriendUser(Model):
|
||||
platform = fields.CharField(255, null=True, description="平台")
|
||||
"""平台"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "friend_users"
|
||||
table_description = "好友信息数据表"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class GoodsInfo(Model):
|
||||
icon = fields.TextField(null=True)
|
||||
"""图标路径"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "goods_info"
|
||||
table_description = "商品数据表"
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class GroupConsole(Model):
|
||||
platform = fields.CharField(255, default="qq", description="所属平台")
|
||||
"""所属平台"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "group_console"
|
||||
table_description = "群组信息表"
|
||||
unique_together = ("group_id", "channel_id")
|
||||
|
||||
@@ -23,7 +23,7 @@ class GroupInfo(Model):
|
||||
platform = fields.CharField(255, default="qq", description="所属平台")
|
||||
"""所属平台"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "group_info"
|
||||
table_description = "群聊信息表"
|
||||
|
||||
@@ -75,8 +75,8 @@ class GroupInfo(Model):
|
||||
group_id=group_id, defaults={"platform": platform}
|
||||
)
|
||||
if is_superuser:
|
||||
if "module," not in group.superuser_block_plugin:
|
||||
group.superuser_block_plugin += f"{module},"
|
||||
if "module," not in group.superuser_block_plugin: # type: ignore
|
||||
group.superuser_block_plugin += f"{module}," # type: ignore
|
||||
elif "module," not in group.block_plugin:
|
||||
group.block_plugin += f"{module},"
|
||||
await group.save(update_fields=["block_plugin", "superuser_block_plugin"])
|
||||
@@ -99,8 +99,8 @@ class GroupInfo(Model):
|
||||
group_id=group_id, defaults={"platform": platform}
|
||||
)
|
||||
if is_superuser:
|
||||
if "module," in group.superuser_block_plugin:
|
||||
group.superuser_block_plugin = group.superuser_block_plugin.replace(
|
||||
if "module," in group.superuser_block_plugin: # type: ignore
|
||||
group.superuser_block_plugin = group.superuser_block_plugin.replace( # type: ignore
|
||||
f"{module},", ""
|
||||
)
|
||||
elif "module," in group.block_plugin:
|
||||
|
||||
@@ -22,7 +22,7 @@ class GroupInfoUser(Model):
|
||||
platform = fields.CharField(255, null=True, description="平台")
|
||||
"""平台"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "group_info_users"
|
||||
table_description = "群员信息数据表"
|
||||
unique_together = ("user_id", "group_id")
|
||||
|
||||
@@ -15,7 +15,7 @@ class LevelUser(Model):
|
||||
group_flag = fields.IntField(default=0)
|
||||
"""特殊标记,是否随群管理员变更而设置权限"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "level_users"
|
||||
table_description = "用户权限数据库"
|
||||
unique_together = ("user_id", "group_id")
|
||||
|
||||
@@ -51,7 +51,7 @@ class PluginInfo(Model):
|
||||
is_show = fields.BooleanField(default=True, description="是否显示在帮助中")
|
||||
"""是否显示在帮助中"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "plugin_info"
|
||||
table_description = "插件基本信息"
|
||||
|
||||
|
||||
@@ -35,6 +35,6 @@ class PluginLimit(Model):
|
||||
max_count = fields.IntField(null=True, description="最大调用次数")
|
||||
"""最大调用次数"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "plugin_limit"
|
||||
table_description = "插件限制"
|
||||
|
||||
@@ -24,7 +24,7 @@ class SignGroupUser(Model):
|
||||
"""使用指定双倍概率"""
|
||||
# specify_probability = fields.DecimalField(10, 3, default=0)
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "sign_group_users"
|
||||
table_description = "群员签到数据表"
|
||||
unique_together = ("user_id", "group_id")
|
||||
|
||||
@@ -17,6 +17,6 @@ class SignLog(Model):
|
||||
platform = fields.CharField(255, null=True, description="平台")
|
||||
"""平台"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "sign_log"
|
||||
table_description = "用户签到记录表"
|
||||
|
||||
@@ -32,7 +32,7 @@ class SignUser(Model):
|
||||
platform = fields.CharField(255, null=True, description="平台")
|
||||
"""平台"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "sign_users"
|
||||
table_description = "用户签到数据表"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class Statistics(Model):
|
||||
bot_id = fields.CharField(255, null=True)
|
||||
"""Bot Id"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "statistics"
|
||||
table_description = "插件调用统计数据库"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class TaskInfo(Model):
|
||||
run_count = fields.IntField(default=0, description="运行次数")
|
||||
"""运行次数"""
|
||||
|
||||
class Meta: # type: ignore
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "task_info"
|
||||
table_description = "被动技能基本信息"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class UserConsole(Model):
|
||||
create_time = fields.DatetimeField(auto_now_add=True, description="创建时间")
|
||||
"""创建时间"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "user_console"
|
||||
table_description = "用户数据表"
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ class UserGoldLog(Model):
|
||||
create_time = fields.DatetimeField(auto_now_add=True, description="创建时间")
|
||||
"""创建时间"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "user_gold_log"
|
||||
table_description = "用户金币记录表"
|
||||
|
||||
@@ -15,6 +15,6 @@ class UserProps(Model):
|
||||
platform = fields.CharField(255, null=True)
|
||||
"""平台"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "user_props"
|
||||
table_description = "用户道具表"
|
||||
|
||||
@@ -20,6 +20,6 @@ class UserPropsLog(Model):
|
||||
create_time = fields.DatetimeField(auto_now_add=True, description="创建时间")
|
||||
"""创建时间"""
|
||||
|
||||
class Meta:
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "user_props_log"
|
||||
table_description = "用户道具记录表"
|
||||
|
||||
Reference in New Issue
Block a user