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
@@ -32,8 +32,7 @@ class Indices:
|
||||
|
||||
|
||||
def string_overlap(a: str, b: str) -> tuple[Indices | None, Indices | None]:
|
||||
"""
|
||||
Find the longest overlap where the end of string a matches the start
|
||||
"""Find the longest overlap where the end of string a matches the start
|
||||
of string b.
|
||||
|
||||
Args:
|
||||
@@ -43,8 +42,8 @@ def string_overlap(a: str, b: str) -> tuple[Indices | None, Indices | None]:
|
||||
Returns:
|
||||
Tuple of IndicesTuples representing the overlapping portions in each
|
||||
string, or a tuple of None if no overlap exists
|
||||
"""
|
||||
|
||||
"""
|
||||
# swap so a is always the shorter string
|
||||
a, b, swap = (a, b, False) if len(a) < len(b) else (b, a, True)
|
||||
|
||||
@@ -188,8 +187,7 @@ class Olmo3ReasoningBuffer:
|
||||
|
||||
|
||||
class Olmo3ReasoningParser(ReasoningParser):
|
||||
"""
|
||||
Reasoning parser for Olmo 3 model
|
||||
"""Reasoning parser for Olmo 3 model.
|
||||
|
||||
Olmo3ReasoningParser
|
||||
|
||||
@@ -285,8 +283,8 @@ class Olmo3ReasoningParser(ReasoningParser):
|
||||
Returns:
|
||||
tuple[Optional[str], Optional[str]]: Tuple pair containing the
|
||||
reasoning content and non-reasoning content.
|
||||
"""
|
||||
|
||||
"""
|
||||
re_match = self.reasoning_regex.match(model_output)
|
||||
if re_match:
|
||||
reasoning = re_match.group("reasoning") or None
|
||||
@@ -305,8 +303,7 @@ class Olmo3ReasoningParser(ReasoningParser):
|
||||
current_token_ids: Sequence[int],
|
||||
delta_token_ids: Sequence[int],
|
||||
) -> DeltaMessage | None:
|
||||
"""Extract content using token ID sequence state machine"""
|
||||
|
||||
"""Extract content using token ID sequence state machine."""
|
||||
delta_message = self.buffer.add_text(delta_text)
|
||||
if delta_message is None and self.buffer.think_end in self.buffer.buffer:
|
||||
# this is a bit hacky, but, because of how the buffer is
|
||||
|
||||
Reference in New Issue
Block a user