Skip to content
Myr

Change wrapper logic for testing

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

authored by Keyan Pishdadian · committed by Keyan Pishdadian · parent 4a9e34a · Browse files · 1 file+3 added−4 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−4 removed

  • other:+3 added−4 removed

1 file+3 added−4 removed

modified:scripts/flaskext_migrate.py+3 added-4 removed
81 unmodified lines
8283 return red848586def fix(input_file):87 ast = read_source(input_file)88 new_ast = fix_imports(ast)89 write_source(new_ast, input_file)86def fix(ast):87 """Wrapper which allows for testing when not running from shell"""88 return fix_imports(ast).dumps()8990if __name__ == "__main__":91 input_file = sys.argv[1]92 fix(input_file)