Skip to content
Myr

Merge pull request #1030 from zakj/master

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

Fix typos in docstrings and comments in run.py

authored by Daniel Neuhäuser · committed by Daniel Neuhäuser · parents ea73571, e21afed · Browse files · 1 file+7 added−7 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+7 added−7 removed

  • other:+7 added−7 removed

1 file+7 added−7 removed

modified:flask/run.py+7 added-7 removed
28 unmodified lines
29 app = getattr(module, 'app', None)30 if app is not None and callable(app):31 return app3233 # Otherwise find the first object named Flask33 # Otherwise find exactly one Flask instance, or fail.34 matches = []35 for key, value in iteritems(module.__dict__):36 if isinstance(value, Flask):37 matches.append(value)
13 unmodified lines
5152def prepare_exec_for_file(filename):53 module = []5455 # Chop off file extensions or package markers55 # Chop off file extensions or package markers.56 if filename.endswith('.py'):57 filename = filename[:-3]58 elif os.path.split(filename)[1] == '__init__.py':59 filename = os.path.dirname(filename)
32 unmodified lines
92 return app939495class DispatchingApp(object):96 """Special applicationt that dispatches to a flask application which96 """Special application that dispatches to a flask application which97 is imported by name on first request. This is safer than importing98 the application upfront because it means that we can forward all99 errors for import problems into the browser as error.98 the application up front because it means that we can forward all99 errors for import problems into the browser as errors.100 """101102 def __init__(self, app_id, debug=None, use_eager_loading=False):103 self.app_id = app_id
22 unmodified lines
126 use_reloader=False, use_debugger=False,127 use_eager_loading=None, magic_app_id=True,128 **options):129 """Useful function to start a Werkzeug server for an application that130 is known by it's import name. By default the app ID can also be a130 is known by its import name. By default the app ID can also be a131 full file name in which case Flask attempts to reconstruct the import132 name from it and do the right thing.133134 :param app_id: the import name of the application module. If a colon
23 unmodified lines
158159 if use_eager_loading is None:160 use_eager_loading = not use_reloader161162 # Extra startup messages. This depends a but on Werkzeug internals to162 # Extra startup messages. This depends a bit on Werkzeug internals to163 # not double execute when the reloader kicks in.164 if os.environ.get('WERKZEUG_RUN_MAIN') != 'true':165 print ' * Serving Flask app "%s"' % app_id166 if debug is not None:
81 unmodified lines