Skip to content

docs: add and improve numpy-style docstrings across entire codebase#8

Merged
royerloic merged 5 commits intomainfrom
improve-docstrings
Feb 12, 2026
Merged

docs: add and improve numpy-style docstrings across entire codebase#8
royerloic merged 5 commits intomainfrom
improve-docstrings

Conversation

@royerloic
Copy link
Copy Markdown
Member

@royerloic royerloic commented Feb 12, 2026

Summary

  • Added and improved numpy-style docstrings across 125+ files in all subsystems
  • Fixed pre-existing copy-paste errors, typos, and misleading messages discovered during review
  • Two rounds of thorough diff review ensured docstring accuracy against actual code behavior

Commits

  1. docs: add and improve numpy-style docstrings across entire codebase — Module-level docstrings, class/method/function docstrings with Parameters/Returns/Raises sections, standardised to numpy format (125 files)
  2. docs: improve base_api.py docstring formatting to numpy style — Reformatted all ~19 method docstrings in base_api.py
  3. fix: correct copy-paste errors, typos, and misleading messages — Fixed 7 pre-existing bugs:
    • default_api.py: comments saying "video" in document methods
    • media_action.py: validation messages saying "Object" instead of "Action"
    • media_table.py: error message referencing "dataframe" instead of "table"
    • process_response.py: variable typo processed_reponse to processed_response
    • ollama_api.py: comment typo "hat" to "that"
    • list_models.py: comment typo "ls" to "list"
    • ffmpeg_utils.py: comment typo "a.k_dict.a." to "a.k.a."
  4. docs: fix inaccurate docstrings found during review — Fixed 5 issues found by diff review:
    • print_api_callbacks.py: removed false claims about conditional printing
    • default_api.py generate_text: clarified base vs subclass return behavior
    • default_api.py describe_image: fixed return type to Optional[str]
    • anthropic_api.py _uses_adaptive_thinking: fixed parenthetical about suffix stripping
    • ollama_api.py embed_texts: corrected "PCA" to "deterministic random projection"
  5. fix: correct expected error messages in test_action.py — Updated tests to match the corrected "Action" validation messages

Scope

Subsystem Files
agent/ (core, tools, augmentations, messages, actions) ~26 files
apis/ (core, providers: openai, anthropic, google, ollama) ~36 files
media/ (core, types, conversion) ~29 files
utils/ ~25 files
tools/, remote/, workflow/, ressources/ ~9 files

Stats

  • ~4,600 lines added, ~250 lines removed across 125+ files
  • All files pass py_compile syntax verification
  • Code formatted with black and isort
  • Two rounds of automated diff review (8 agents total) verified accuracy

Test plan

  • All modified files pass Python syntax verification (py_compile)
  • Code formatted with black and isort
  • Diff reviewed by 8 specialized review agents across all subsystems
  • All inaccuracies found during review have been fixed
  • Test suite updated for changed validation messages (test_action.py)

Generated with Claude Code

royerloic and others added 5 commits February 12, 2026 08:26
Add module-level docstrings, expand class/method/function docstrings,
and standardise to numpy-style format across 125 files covering all
subsystems: agent, apis, media, utils, tools, remote, and workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Standardise all docstrings in base_api.py to place the summary on the
opening triple-quote line and format the Notes section properly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- default_api.py: fix comments saying "video" in document methods
- media_action.py: fix validation messages saying "Object" instead of "Action"
- media_table.py: fix error message referencing "dataframe" instead of "table"
- process_response.py: fix variable typo "processed_reponse" -> "processed_response"
- ollama_api.py: fix comment typo "hat" -> "that"
- list_models.py: fix comment typo "ls" -> "list"
- ffmpeg_utils.py: fix comment typo "a.k_dict.a." -> "a.k.a."

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- print_api_callbacks.py: remove false claims about conditional printing
- default_api.py generate_text: clarify base vs subclass return behavior
- default_api.py describe_image: fix return type to Optional[str]
- anthropic_api.py _uses_adaptive_thinking: fix parenthetical about suffix stripping
- ollama_api.py embed_texts: correct "PCA" to "deterministic random projection"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests expected generic "Object" wording but actual code uses "Action".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@royerloic royerloic merged commit deac213 into main Feb 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant