chore(pre-commit): add pre-commit

This commit is contained in:
MingxuanGame
2025-07-25 20:46:52 +08:00
parent f347b680b2
commit 46c19dddc1
14 changed files with 748 additions and 642 deletions

View File

@@ -80,7 +80,7 @@ async def oauth_token(
raise HTTPException(status_code=400, detail="Refresh token required")
# 验证刷新令牌
token_record =await get_token_by_refresh_token(db, refresh_token)
token_record = await get_token_by_refresh_token(db, refresh_token)
if not token_record:
raise HTTPException(status_code=401, detail="Invalid refresh token")

View File

@@ -1,6 +1,10 @@
from __future__ import annotations
class SignalRException(Exception):
pass
class InvokeException(SignalRException):
def __init__(self, message: str) -> None:
self.message = message

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from .hub import Hub

View File

@@ -1,4 +1,6 @@
from __future__ import annotations
from .hub import Hub
class MultiplayerHub(Hub): ...
class MultiplayerHub(Hub): ...

View File

@@ -8,10 +8,8 @@ from .hub import Client, Hub
class SpectatorHub(Hub):
async def BeginPlaySession(
self, client: Client, score_token: int, state: SpectatorState
) -> None:
...
) -> None: ...
async def SendFrameData(
self, client: Client, frame_data: FrameDataBundle
) -> None:
...
) -> None: ...

View File

@@ -4,7 +4,6 @@ from enum import IntEnum
from typing import Any
import msgpack
from pydantic import BaseModel, model_validator
SEP = b"\x1e"
@@ -18,6 +17,7 @@ class PacketType(IntEnum):
PING = 6
CLOSE = 7
class ResultKind(IntEnum):
ERROR = 1
VOID = 2