ci/lint: prek commit gateway (ruff check/format + basedpyright)

Add prek.toml so git commit runs ruff-pre-commit (fix then format) and
pdm-based basedpyright. Document install/install-hook; clear type warnings
that made basedpyright exit non-zero under recommended mode.
This commit is contained in:
2026-07-18 14:10:04 +08:00
parent 39f9a7f636
commit 9b38a3b333
8 changed files with 60 additions and 37 deletions
+3 -2
View File
@@ -30,6 +30,7 @@ from plyngent.lmproto.openai_compatible.model import (
ChatCompletionsParam,
ChunkChoice,
DeltaMessage,
FinishReason,
StreamFunctionDelta,
StreamToolCallDelta,
ToolChatMessage,
@@ -174,8 +175,8 @@ class ScriptedClient:
def _response(
message: AssistantChatMessage,
*,
usage: dict[str, int] | None = None,
finish_reason: str | None = "stop",
usage: dict[str, object] | None = None,
finish_reason: FinishReason | None = "stop",
) -> ChatCompletionResponse:
return ChatCompletionResponse(
id="1",