diff --git a/poetry.lock b/poetry.lock index 0b10b87c..1882d898 100644 --- a/poetry.lock +++ b/poetry.lock @@ -650,20 +650,6 @@ files = [ {file = "invoke-2.2.0.tar.gz", hash = "sha256:ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5"}, ] -[[package]] -name = "isort" -version = "5.13.2" -description = "A Python utility / library to sort Python imports." -optional = false -python-versions = ">=3.8.0" -files = [ - {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, - {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, -] - -[package.extras] -colors = ["colorama (>=0.4.6)"] - [[package]] name = "jaraco-classes" version = "3.4.0" @@ -1373,4 +1359,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.8.1" -content-hash = "db34c95c5db5ae1f91539580528953489276cd9d1b8e71dea6aee2aa1c2c5383" +content-hash = "9358f49d64a5a39391dfb17818e79551cbcd4428d6de870263edb8330a41c5e2" diff --git a/pyproject.toml b/pyproject.toml index 3dfcec41..0d1c17b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,6 @@ pytest-benchmark = '^4.0.0' pytest-xdist = '^3.1.0' [tool.poetry.group.dev.dependencies] -isort = '^5.12.0' black = '^24.1.0' mypy = '^1.0.1' py-githooks = '^1.1.1' @@ -79,20 +78,6 @@ exclude = ''' ) ''' -[tool.isort] -force_grid_wrap = 2 -known_first_party = 'syrupy' -profile = 'black' -skip = ''' -.eggs, -.mypy_cache, -.venv, -syrupy.venv, -.poetry, -build, -dist, -''' - [tool.pytest.ini_options] addopts = '-p syrupy -p pytester -p no:legacypath --doctest-modules' testpaths = ['tests'] @@ -104,6 +89,11 @@ source = ['./src'] [tool.coverage.report] exclude_lines = ['pragma: no-cover', 'if TYPE_CHECKING:', '@abstractmethod'] +[tool.ruff.lint] +extend-select = [ + "I", # isort +] + [build-system] requires = ['poetry-core>=1.9.0'] build-backend = 'poetry.core.masonry.api' diff --git a/src/syrupy/extensions/amber/__init__.py b/src/syrupy/extensions/amber/__init__.py index 74dbc33b..76347031 100644 --- a/src/syrupy/extensions/amber/__init__.py +++ b/src/syrupy/extensions/amber/__init__.py @@ -12,8 +12,10 @@ from syrupy.exceptions import TaintedSnapshotError from syrupy.extensions.base import AbstractSyrupyExtension -from .serializer import AmberDataSerializerSorted # noqa: F401 # re-exported -from .serializer import AmberDataSerializer +from .serializer import ( # noqa: F401 + AmberDataSerializer, + AmberDataSerializerSorted, # re-exported +) if TYPE_CHECKING: from syrupy.types import SerializableData diff --git a/tasks/lint.py b/tasks/lint.py index ecb848f1..5b1d44ea 100644 --- a/tasks/lint.py +++ b/tasks/lint.py @@ -6,11 +6,10 @@ from .utils import ctx_run lint_commands = { - "isort": lambda fix: f"python -m isort {'' if fix else '--check'} .", "black": lambda fix: f"python -m black {'' if fix else '--check'} .", "flake8": lambda _: "python -m flake8 src tests benchmarks *.py", "mypy": lambda _: "python -m mypy --strict src benchmarks", - "ruff": lambda _: "python -m ruff check", + "ruff": lambda fix: f"python -m ruff check {'--fix' if fix else ''} .", }