diff --git a/bin/tidy-imports b/bin/tidy-imports index 39a16815..c07106e5 100755 --- a/bin/tidy-imports +++ b/bin/tidy-imports @@ -27,7 +27,7 @@ from pyflyby._cmdline import hfmt, parse_args, process_actions from pyflyby._imports2s import (canonicalize_imports, fix_unused_and_missing_imports, replace_star_imports, - transform_imports, sort_imports) + transform_imports) import toml TOML_AVAIL = True @@ -156,13 +156,11 @@ def main(): ) # TODO: disable sorting until we figure out #287 # https://github.com/deshaw/pyflyby/issues/287 - # sorted_imports = sort_imports(x) - sorted_imports = x + # from pyflyby._imports2s import sort_imports + # x = sort_imports(x) if options.canonicalize: - cannonical_imports = canonicalize_imports(sorted_imports, params=options.params) - else: - cannonical_imports = sort_imports - return cannonical_imports + x = canonicalize_imports(x, params=options.params) + return x process_actions(args, options.actions, modify)