This commit is contained in:
Waylon Walker 2022-03-31 20:20:07 -05:00
commit 38355d2442
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
9083 changed files with 1225834 additions and 0 deletions

35
.venv/bin/prune-broken-imports Executable file
View file

@ -0,0 +1,35 @@
#!/home/walkers/git/creeper-adventure/.venv/bin/python3
"""
prune-broken-imports *.py
prune-broken-imports < foo.py
Removes broken imports.
Note: This actually executes imports.
If filenames are given on the command line, rewrites them. Otherwise, if
stdin is not a tty, read from stdin and write to stdout.
Only top-level import statements are touched.
"""
# pyflyby/prune-broken-imports
# Copyright (C) 2012, 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 remove_broken_imports
def main():
options, args = parse_args(
import_format_params=True, modify_action_params=True)
def modify(x):
return remove_broken_imports(x, params=options.params)
process_actions(args, options.actions, modify)
if __name__ == '__main__':
main()