Skip to content

Commit

Permalink
Disable import sorting for now.
Browse files Browse the repository at this point in the history
This should take care of #287 until we reimplement the sorting logic.
  • Loading branch information
Carreau committed Feb 22, 2024
1 parent 335c95b commit f118eac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion bin/tidy-imports
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ def main():
remove_unused=options.remove_unused,
add_mandatory=options.add_mandatory,
)
sorted_imports = sort_imports(x)
# TODO: disable sorting until we figure out #287
# https://github.com/deshaw/pyflyby/issues/287
# sorted_imports = sort_imports(x)
sorted_imports = x
if options.canonicalize:
cannonical_imports = canonicalize_imports(sorted_imports, params=options.params)
else:
Expand Down
5 changes: 1 addition & 4 deletions tests/test_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def foo():
foo() + os + sys
import a
import c
a, c
''').lstrip()
assert result == expected_result
Expand All @@ -139,7 +138,6 @@ def test_tidy_imports_no_add_no_remove_1():
import a
import b
import c
a, c, os, sys
''').strip()
assert result == expected
Expand Down Expand Up @@ -449,7 +447,6 @@ def test_tidy_imports_query_y_1():
expected = dedent("""
from __future__ import absolute_import, division
import x1
x1
""")
assert output == expected
Expand Down Expand Up @@ -708,6 +705,7 @@ def test_debug_filetype_with_py():
assert expected in output_result.decode()


@pytest.mark.skip(reason='disable sorting for time being until 287 fixed')
def test_tidy_imports_sorting():
with tempfile.NamedTemporaryFile(suffix=".py", mode="w+") as f:
f.write(
Expand Down Expand Up @@ -792,7 +790,6 @@ def test_tidy_imports_forward_references():
foo_fp.write(dedent("""
from __future__ import annotations
class A:
param1: str
param2: B
Expand Down

0 comments on commit f118eac

Please sign in to comment.