From d1828029ecc60710599deb66ec277c5df481f13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Sat, 7 Oct 2023 20:08:51 +0200 Subject: [PATCH] refactor: Revert addition of `ssort` `ssort` re-orders class attributes without taking their docstrings into account. See https://github.com/bwhmather/ssort/issues/70 --- README.md | 1 - project/duties.py.jinja | 3 +-- project/pyproject.toml.jinja | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index d570a3f..c773987 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ If you are using it, see [how to migrate to copier-pdm](https://pawamoy.github.i - Pre-configured tools for code formatting, quality analysis and testing: - [black](https://github.com/psf/black), - [blacken-docs](https://github.com/adamchainz/blacken-docs), - - [ssort](https://github.com/bwhmather/ssort), - [ruff](https://github.com/charliermarsh/ruff), - [mypy](https://github.com/python/mypy), - [safety](https://github.com/pyupio/safety) diff --git a/project/duties.py.jinja b/project/duties.py.jinja index 69e973f..0f4d680 100644 --- a/project/duties.py.jinja +++ b/project/duties.py.jinja @@ -9,7 +9,7 @@ from pathlib import Path from typing import TYPE_CHECKING, Any from duty import duty -from duty.callables import black, blacken_docs, coverage, lazy, mkdocs, mypy, pytest, ruff, safety, ssort +from duty.callables import black, blacken_docs, coverage, lazy, mkdocs, mypy, pytest, ruff, safety if TYPE_CHECKING: from duty.context import Context @@ -255,7 +255,6 @@ def format(ctx: Context) -> None: ruff.check(*PY_SRC_LIST, config="config/ruff.toml", fix_only=True, exit_zero=True), title="Auto-fixing code", ) - ctx.run(ssort.run(*PY_SRC_LIST), title="Sorting code") ctx.run(black.run(*PY_SRC_LIST, config="config/black.toml"), title="Formatting code") ctx.run( blacken_docs.run(*PY_SRC_LIST, "docs", exts=["py", "md"], line_length=120), diff --git a/project/pyproject.toml.jinja b/project/pyproject.toml.jinja index 6c5297a..e2f3eae 100644 --- a/project/pyproject.toml.jinja +++ b/project/pyproject.toml.jinja @@ -147,7 +147,6 @@ maintain = [ "black>=23.1", "blacken-docs>=1.13", "git-changelog>=1.0", - "ssort>=0.11", ] quality = [ "ruff>=0.0.246",