forked from orbit-oss/flask
Merge pull request #2848 from gcrsaldanha/use-itervalues
🎨 Use `itervalues` instead of `iteritems` when `key` is not necessary
This commit is contained in:
commit
0bb25eb367
1 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ import click
|
||||||
from werkzeug.utils import import_string
|
from werkzeug.utils import import_string
|
||||||
|
|
||||||
from . import __version__
|
from . import __version__
|
||||||
from ._compat import getargspec, iteritems, reraise, text_type
|
from ._compat import getargspec, itervalues, reraise, text_type
|
||||||
from .globals import current_app
|
from .globals import current_app
|
||||||
from .helpers import get_debug_flag, get_env, get_load_dotenv
|
from .helpers import get_debug_flag, get_env, get_load_dotenv
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ def find_best_app(script_info, module):
|
||||||
|
|
||||||
# Otherwise find the only object that is a Flask instance.
|
# Otherwise find the only object that is a Flask instance.
|
||||||
matches = [
|
matches = [
|
||||||
v for k, v in iteritems(module.__dict__) if isinstance(v, Flask)
|
v for v in itervalues(module.__dict__) if isinstance(v, Flask)
|
||||||
]
|
]
|
||||||
|
|
||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue