Skip to content
Myr

adjust for loop style

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

authored by David Lord · committed by David Lord · parent 7ecdbcf · Browse files · 2 files+4 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

2 files+4 added−4 removed

  • other:+4 added−4 removed

2 files+4 added−4 removed

modified:flask/cli.py+2 added-2 removed
33 unmodified lines
34 """35 from . import Flask3637 # Search for the most common names first.38 for attr_name in 'app', 'application':38 for attr_name in ('app', 'application'):39 app = getattr(module, attr_name, None)40 if isinstance(app, Flask):41 return app42
11 unmodified lines
54 ' one.'.format(module=module.__name__)55 )5657 # Search for app factory callables.58 for attr_name in 'create_app', 'make_app':58 for attr_name in ('create_app', 'make_app'):59 app_factory = getattr(module, attr_name, None)6061 if callable(app_factory):62 try:
545 unmodified lines
modified:CHANGES+2 added-2 removed
38 unmodified lines
39 (`#2282`_)40- Allow IP address as exact session cookie domain. (`#2282`_)41- ``SESSION_COOKIE_DOMAIN`` is set if it is detected through ``SERVER_NAME``.42 (`#2282`_)43- Auto-detect 0-argument app factory called ``create_app`` or ``make_app`` from44 ``FLASK_APP``. (`#2297`_)43- Auto-detect zero-argument app factory called ``create_app`` or ``make_app``44 from ``FLASK_APP``. (`#2297`_)4546.. _#1489: https://github.com/pallets/flask/pull/148947.. _#1898: https://github.com/pallets/flask/pull/189848.. _#1936: https://github.com/pallets/flask/pull/1936
626 unmodified lines