Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix - Do not sort imports #326

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading