Skip to content

Commit

Permalink
Merge pull request #2870 from jerr0328/docs-update-cli-scriptinfo
Browse files Browse the repository at this point in the history
馃摎 Improve docs about ScriptInfo
  • Loading branch information
davidism committed Jul 20, 2018
2 parents 06b189b + c7791bb commit 93e4b71
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ found, the command looks for a factory function named ``create_app`` or
``make_app`` that returns an instance.

When calling an application factory, if the factory takes an argument named
``info``, then the :class:`~cli.ScriptInfo` instance is passed as a keyword
argument. If parentheses follow the factory name, their contents are parsed
as Python literals and passes as arguments to the function. This means that
strings must still be in quotes.
``script_info``, then the :class:`~cli.ScriptInfo` instance is passed as a
keyword argument. If the application factory takes only one argument and no
parentheses follow the factory name, the :class:`~cli.ScriptInfo` instance
is passed as a positional argument. If parentheses follow the factory name,
their contents are parsed as Python literals and passes as arguments to the
function. This means that strings must still be in quotes.


Run the Development Server
Expand Down

0 comments on commit 93e4b71

Please sign in to comment.