Skip to content

📝 Add docstrings to testing module#1677

Open
mastash3ff wants to merge 1 commit intofastapi:masterfrom
mastash3ff:docs/add-docstrings-testing
Open

📝 Add docstrings to testing module#1677
mastash3ff wants to merge 1 commit intofastapi:masterfrom
mastash3ff:docs/add-docstrings-testing

Conversation

@mastash3ff
Copy link
Copy Markdown

Summary

typer/testing.py shipped with no docstrings on the module, the CliRunner class, or its invoke method. This PR adds all three.

  • Module docstring — brief description of the module's purpose with a link to the testing tutorial.
  • CliRunner class docstring — explains what it extends and why, with a short usage example that mirrors the style used for the Typer class in typer/main.py.
  • CliRunner.invoke docstring — describes what the method does and delegates to for readers who land on the API reference.

No logic, behaviour, or type annotations were changed. The diff is +48 / -0 lines.

Checklist

  • Docstring style matches existing project conventions (plain prose, Markdown, links to the tutorial)
  • ruff check passes
  • ruff format --check passes
  • No test files modified
  • No logic changes

Add a module docstring, class docstring for `CliRunner`, and a method
docstring for `CliRunner.invoke` in `typer/testing.py`. All three were
undocumented. Docstrings follow the existing project style (plain prose
with Markdown and links to the relevant tutorial page).
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.

2 participants