deprecate passing script_info to factory

This commit is contained in:
David Lord 2020-04-07 15:54:36 -07:00
parent 7e3b8abf99
commit fcac7f11cf
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 45 additions and 38 deletions

View file

@ -75,13 +75,9 @@ Within the given import, the command looks for an application instance named
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
``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.
If parentheses follow the factory name, their contents are parsed as
Python literals and passed as arguments to the function. This means that
strings must still be in quotes.
Run the Development Server