Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -233,6 +233,7 @@ class OnlineDerenderer:
|
||||
Returns:
|
||||
(new_text, updated_state) — the delta text for this chunk and the
|
||||
state to pass to the next call.
|
||||
|
||||
"""
|
||||
prev_tokens = list(state.prev_tokens)
|
||||
prefix_offset = state.prefix_offset
|
||||
@@ -296,6 +297,7 @@ class OnlineDerenderer:
|
||||
Returns:
|
||||
(chunk, updated_state) — the derendered SSE chunk and the state
|
||||
the client must pass to the next call.
|
||||
|
||||
"""
|
||||
if state is None:
|
||||
state = DerenderStreamState()
|
||||
@@ -461,6 +463,7 @@ class OnlineDerenderer:
|
||||
|
||||
Returns:
|
||||
(chunk, updated_state) — the derendered chunk and updated state.
|
||||
|
||||
"""
|
||||
if state is None:
|
||||
state = DerenderStreamState()
|
||||
@@ -613,7 +616,8 @@ def _convert_chat_logprobs_to_completion_logprobs(
|
||||
logprobs: ChatCompletionLogProbs,
|
||||
) -> CompletionLogProbs:
|
||||
"""Convert ChatCompletionLogProbs (per-token objects) to CompletionLogProbs
|
||||
(parallel flat lists) as required by the /v1/completions response schema."""
|
||||
(parallel flat lists) as required by the /v1/completions response schema.
|
||||
"""
|
||||
if logprobs.content is None:
|
||||
return CompletionLogProbs()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user