Skip to content
Myr

:art: Use itervalues instead of iteritems

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

authored by Gabriel Saldanha · committed by Gabriel Saldanha · parent 7627d9c · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:flask/cli.py+2 added-2 removed
24 unmodified lines
25import click26from werkzeug.utils import import_string2728from . import __version__29from ._compat import getargspec, iteritems, reraise, text_type29from ._compat import getargspec, itervalues, reraise, text_type30from .globals import current_app31from .helpers import get_debug_flag, get_env, get_load_dotenv3233try:
20 unmodified lines
54 return app5556 # Otherwise find the only object that is a Flask instance.57 matches = [58 v for k, v in iteritems(module.__dict__) if isinstance(v, Flask)58 v for v in itervalues(module.__dict__) if isinstance(v, Flask)59 ]6061 if len(matches) == 1:62 return matches[0]
841 unmodified lines