Skip to content
Myr

Merge pull request #2962 from garenchan/dev

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

Cache return values to avoid repeated function calls.

authored by David Lord · committed by GitHub · parents 673772c, 9bc87d0 · Browse files · 1 file+3 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+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:flask/cli.py+3 added-2 removed
204 unmodified lines
205 to the search path and return the actual module name that is expected.206 """207 path = os.path.realpath(path)208209 if os.path.splitext(path)[1] == '.py':210 path = os.path.splitext(path)[0]209 fname, ext = os.path.splitext(path)210 if ext == '.py':211 path = fname212213 if os.path.basename(path) == '__init__':214 path = os.path.dirname(path)215
689 unmodified lines