Add wrapper for testing fixing functionality
This commit is contained in:
parent
c90c4e5e8c
commit
4a9e34a574
1 changed files with 5 additions and 2 deletions
|
|
@ -83,8 +83,11 @@ def fix_standard_imports(red):
|
||||||
return red
|
return red
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def fix(input_file):
|
||||||
input_file = sys.argv[1]
|
|
||||||
ast = read_source(input_file)
|
ast = read_source(input_file)
|
||||||
new_ast = fix_imports(ast)
|
new_ast = fix_imports(ast)
|
||||||
write_source(new_ast, input_file)
|
write_source(new_ast, input_file)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
input_file = sys.argv[1]
|
||||||
|
fix(input_file)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue