Skip to content

Conversation

@Mohamed-Elwasila
Copy link

What I Fixed

The CliRunner.invoke() method had outdated documentation that referenced a cli parameter, but the actual parameter is called app.

Why This Matters

When developers use CliRunner for testing, they see documentation mentioning a parameter that doesn't exist. This happens because Typer's CliRunner inherits the docstring from Click's version, which uses different parameter names.

Now the docs correctly show that you pass in a Typer application object via the app parameter.

Changes Made

  • Changed :param cli: to :param app: in the docstring
  • Added a note explaining this is a Typer-specific wrapper around Click's CliRunner

The invoke() method in Typer's CliRunner accepts an 'app' parameter
(Typer application) instead of 'cli' (Click command). Updated the
docstring to accurately reflect this Typer-specific parameter and
clarify that this is a wrapper around Click's CliRunner.
@svlandeg svlandeg added the docs Improvements or additions to documentation label Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants