mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
* 🔧 启用一些 ruff 的新规则 * ➕ 添加开发依赖 nonebot-adapter-qq * ➕ 添加依赖 nonebot-plugin-session * ➕ 添加依赖 nonebot-plugin-session-orm * 🔧 忽略 ruff 规则 ISC001 format 冲突风险 * 🚨 修复 ruff 警报 * ♻️ 重构! * ♻️ 恢复定时获取 TetraLeague 数据的功能 * ✨ 统一处理需要捕获的错误 * ✨ 记录用户触发的指令
24 lines
496 B
Python
24 lines
496 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from ..utils.typing import GameType
|
|
|
|
|
|
class Base(BaseModel):
|
|
platform: GameType
|
|
|
|
|
|
class BaseUser(ABC, Base):
|
|
"""游戏用户"""
|
|
|
|
def __eq__(self, __value: object) -> bool:
|
|
if isinstance(__value, BaseUser):
|
|
return self.unique_identifier == __value.unique_identifier
|
|
return False
|
|
|
|
@property
|
|
@abstractmethod
|
|
def unique_identifier(self) -> str:
|
|
raise NotImplementedError
|