mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
* ⬆️ Bump aiohttp from 3.10.1 to 3.10.2 Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.1 to 3.10.2. - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.10.1...v3.10.2) --- updated-dependencies: - dependency-name: aiohttp dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * 🚨 auto fix by pre-commit hooks --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
25 lines
546 B
Python
25 lines
546 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Generic, TypeVar
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from ..utils.typing import GameType
|
|
|
|
T = TypeVar('T', bound=GameType)
|
|
|
|
|
|
class BaseUser(BaseModel, ABC, Generic[T]):
|
|
"""游戏用户"""
|
|
|
|
platform: T
|
|
|
|
def __eq__(self, other: object) -> bool:
|
|
if isinstance(other, BaseUser):
|
|
return self.unique_identifier == other.unique_identifier
|
|
return False
|
|
|
|
@property
|
|
@abstractmethod
|
|
def unique_identifier(self) -> str:
|
|
raise NotImplementedError
|