init
This commit is contained in:
commit
38355d2442
9083 changed files with 1225834 additions and 0 deletions
28
.venv/bin/reformat-imports
Executable file
28
.venv/bin/reformat-imports
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/home/walkers/git/creeper-adventure/.venv/bin/python3
|
||||
"""
|
||||
reformat-imports *.py
|
||||
reformat-imports < foo.py
|
||||
|
||||
Reformats the top-level 'import' blocks within the python module/script.
|
||||
|
||||
"""
|
||||
# pyflyby/reformat-imports
|
||||
# Copyright (C) 2011, 2014 Karl Chen.
|
||||
# License: MIT http://opensource.org/licenses/MIT
|
||||
|
||||
from __future__ import absolute_import, division, with_statement
|
||||
|
||||
from pyflyby._cmdline import parse_args, process_actions
|
||||
from pyflyby._imports2s import reformat_import_statements
|
||||
|
||||
|
||||
def main():
|
||||
options, args = parse_args(
|
||||
import_format_params=True, modify_action_params=True)
|
||||
def modify(x):
|
||||
return reformat_import_statements(x, params=options.params)
|
||||
process_actions(args, options.actions, modify)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue