diff --git a/setup.cfg b/setup.cfg index 8f60c16..70eef8c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,7 @@ python_requires = >=3.6 install_requires = attrs >= 21.2.0 click >= 7.0.0 - LibCST >= 0.3.7, < 1.0 + LibCST >= 0.3.7 moreorless >= 0.3.0 stdlibs >= 2021.4.1 toml >= 0.10.0 diff --git a/usort/tests/cli.py b/usort/tests/cli.py index fce9d01..1cfe8a2 100644 --- a/usort/tests/cli.py +++ b/usort/tests/cli.py @@ -229,7 +229,7 @@ def test_format_parse_error(self) -> None: self.assertRegex( result.output, - r"Error sorting sample\.py: Syntax Error @ 1:7\.", + r"Error sorting sample\.py: Syntax Error @ 1:", ) self.assertEqual(result.exit_code, 1) @@ -242,7 +242,7 @@ def test_format_parse_error_conflicting_syntax(self) -> None: self.assertRegex( result.output, - r"Error sorting sample\.py: Syntax Error @ 2:11\.", + r"Error sorting sample\.py: Syntax Error @ 2:", ) self.assertEqual(result.exit_code, 1) diff --git a/usort/tests/util.py b/usort/tests/util.py index 4ddf581..c89c9dd 100644 --- a/usort/tests/util.py +++ b/usort/tests/util.py @@ -4,6 +4,7 @@ # LICENSE file in the root directory of this source tree. import unittest +from typing import Sequence import libcst as cst @@ -31,7 +32,7 @@ def test_parse_import_from(self) -> None: cst.ImportFrom, ) self.assertEqual(cst.ensure_type(inner.module, cst.Name).value, "a") - assert isinstance(inner.names, list) + assert isinstance(inner.names, Sequence), f"{type(inner.names)} is not Sequence" name = inner.names[0] self.assertEqual( cst.ensure_type(