mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user