From ff034e42cfb665dc9123c95e51ad3d1455322bd5 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 28 Apr 2014 13:54:13 +0200 Subject: [PATCH] Added a missing docstring --- flask/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flask/cli.py b/flask/cli.py index 7e982878..58e07521 100644 --- a/flask/cli.py +++ b/flask/cli.py @@ -53,6 +53,9 @@ def find_best_app(module): def prepare_exec_for_file(filename): + """Given a filename this will try to calculate the python path, add it + to the search path and return the actual module name that is expected. + """ module = [] # Chop off file extensions or package markers @@ -187,8 +190,7 @@ class FlaskClickGroup(click.Group): def __init__(self, help=None): def set_app_id(ctx, value): if value is not None: - if os.path.isfile(value) or os.sep in value or \ - os.altsep is not None and os.altsep in value: + if os.path.isfile(value): value = prepare_exec_for_file(value) ctx.obj.app_import_path = value def set_debug(ctx, value):