Skip to content

docs(python): add @example blocks to type stubs and modules#1291

Merged
chaliy merged 1 commit intomainfrom
docs/1267-python-type-stub-examples
Apr 14, 2026
Merged

docs(python): add @example blocks to type stubs and modules#1291
chaliy merged 1 commit intomainfrom
docs/1267-python-type-stub-examples

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 14, 2026

Summary

  • Add docstrings with Example:: blocks to all public methods in _bashkit.pyi
  • Update module docstrings in __init__.py, langchain.py, pydantic_ai.py, deepagents.py

Details

Every public method across all classes in the Python type stubs now has a docstring with reStructuredText Example:: block:

  • Bash class (constructor, execute, execute_sync, cancel, reset, fs, mount, etc.)
  • BashTool class (description, input_schema, output_schema, system_prompt, etc.)
  • ScriptedTool class (add_tool, env, execute, etc.)
  • FileSystem class (read_file, write_file, mkdir, etc.)
  • ExecResult class (to_dict)

Module docstrings updated with usage examples for all integration modules.

Test plan

  • ruff check passes
  • ruff format --check passes
  • Examples use correct reStructuredText format
  • Examples match actual API behavior

Closes #1267

@chaliy chaliy merged commit cae2d69 into main Apr 14, 2026
18 checks passed
@chaliy chaliy deleted the docs/1267-python-type-stub-examples branch April 14, 2026 12:55
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.

docs: add @example blocks to Python type stubs

1 participant