Skip to content
Myr

📚 Improve docs about ScriptInfo

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Improve documentation for the CLI using application factories and how/when the ScriptInfo object is passed with Application Discovery

authored by Jeremy Mayeres · committed by Jeremy Mayeres · parent 06b189b · Browse files · 1 file+6 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−4 removed

  • other:+6 added−4 removed

1 file+6 added−4 removed

modified:docs/cli.rst+6 added-4 removed
76 unmodified lines
77found, the command looks for a factory function named ``create_app`` or78``make_app`` that returns an instance.7980When calling an application factory, if the factory takes an argument named81``info``, then the :class:`~cli.ScriptInfo` instance is passed as a keyword82argument. If parentheses follow the factory name, their contents are parsed83as Python literals and passes as arguments to the function. This means that84strings must still be in quotes.81``script_info``, then the :class:`~cli.ScriptInfo` instance is passed as a82keyword argument. If the application factory takes only one argument and no83parentheses follow the factory name, the :class:`~cli.ScriptInfo` instance84is passed as a positional argument. If parentheses follow the factory name,85their contents are parsed as Python literals and passes as arguments to the86function. This means that strings must still be in quotes.878889Run the Development Server90--------------------------
378 unmodified lines