From a6e7fb7ec3f838494aba07e32ae46603c55ba163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=BCnnemeyer?= <506283-horstage@users.noreply.gitlab.com> Date: Tue, 13 Feb 2024 16:53:58 +0100 Subject: [PATCH 1/2] Activate prettier-plugin-toml for pre-commit hooks --- .prettierrc.yaml | 2 ++ README.md | 1 - pyproject.toml | 2 +- .../packages/small_fake_with_build_deps/pyproject.toml | 6 +----- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.prettierrc.yaml b/.prettierrc.yaml index 2003b87a6..463847831 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -3,3 +3,5 @@ overrides: - files: "CHANGELOG.md" options: proseWrap: always +plugins: + - "prettier-plugin-toml" diff --git a/README.md b/README.md index 666dec237..ff17e02d9 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,6 @@ dynamic = ["dependencies", "optional-dependencies"] [tool.setuptools.dynamic] dependencies = { file = ["requirements.in"] } optional-dependencies.test = { file = ["requirements-test.txt"] } - ``` If you have a Django application that is packaged using `Hatch`, and you diff --git a/pyproject.toml b/pyproject.toml index ac3e04ee1..317098b91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "tomli; python_version < '3.11'", # indirect dependencies "setuptools", # typically needed when pip-tools invokes setup.py - "wheel", # pip plugin needed by pip-tools + "wheel", # pip plugin needed by pip-tools ] diff --git a/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml b/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml index c765cd18d..1f9345609 100644 --- a/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml +++ b/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml @@ -1,8 +1,4 @@ [build-system] -requires = [ - "setuptools==68.1.2", - "wheel==0.41.1", - "fake_static_build_dep" -] +requires = ["setuptools==68.1.2", "wheel==0.41.1", "fake_static_build_dep"] build-backend = "backend" backend-path = ["backend"] From 6b5de83b843eccd4b1b9317490a560a164b5b138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=BCnnemeyer?= <506283-horstage@users.noreply.gitlab.com> Date: Fri, 16 Feb 2024 09:34:32 +0100 Subject: [PATCH 2/2] Ignore short multiline entry --- .../packages/small_fake_with_build_deps/pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml b/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml index 1f9345609..bd1b0477a 100644 --- a/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml +++ b/tests/test_data/packages/small_fake_with_build_deps/pyproject.toml @@ -1,4 +1,8 @@ [build-system] -requires = ["setuptools==68.1.2", "wheel==0.41.1", "fake_static_build_dep"] +requires = [ # prettier-ignore + "setuptools==68.1.2", + "wheel==0.41.1", + "fake_static_build_dep", +] build-backend = "backend" backend-path = ["backend"]