Skip to content

Commit

Permalink
πŸ› fix - Do not sort imports #326
Browse files Browse the repository at this point in the history
The sort_imports feature introduced has several issues. So do not use it till #287 is sorted

Request: PyInf#12353
  • Loading branch information
dshivashankar1994 authored Apr 8, 2024
2 parents 82a3fe6 + 3f8b7bb commit 58bb7f9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bin/tidy-imports
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit 58bb7f9

Please sign in to comment.