From 1a5ed1ad8730eaacfbb8454bbbb93be83eca1182 Mon Sep 17 00:00:00 2001 From: "re:fi.64" Date: Mon, 6 Oct 2025 19:44:25 -0500 Subject: [PATCH] Fix pyproject.toml formatting from running updatecli --- pyproject.toml | 80 ++++++++++++++++++------------- updatecli/updatecli.d/uv-deps.cue | 10 ++-- 2 files changed, 52 insertions(+), 38 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 82e638a..bb0d97e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,35 +1,47 @@ - [project] - dependencies = ["basedpyright>=1.31.6", "betterproto[compiler]>=1.2.5", "cloudcoil[codegen,kubernetes]>=0.5.8", "dbus-fast>=2.44.5", "grpclib>=0.4.8", "pytest>=8.4.2", "pytest-asyncio>=1.2.0", "ruff>=0.13.3", "setuptools>=80.9.0"] - name = "topolvm-stratis" - requires-python = ">= 3.10" - version = "0.0.0" - -[tool] - - [tool.basedpyright] - exclude = ["bazel-*", ".*"] - extraPaths = ["bazel-bin/tests"] - reportUnusedCallResult = false - typeCheckingMode = "recommended" - - [tool.pytest] - - [tool.pytest.ini_options] - addopts = ["--import-mode=importlib", "-pno:cloudcoil"] - asyncio_default_fixture_loop_scope = "function" - asyncio_mode = "auto" - log_cli = true - log_cli_level = "INFO" - - [tool.ruff] - - [tool.ruff.format] - quote-style = "single" - - [tool.ruff.lint] - extend-select = ["ANN", "ERA", "I", "PT", "TC"] - - [tool.ruff.lint.isort] - from-first = true - lines-between-types = 1 +name = "topolvm-stratis" +version = "0.0.0" +requires-python = ">= 3.10" +dependencies = [ + "basedpyright>=1.31.6", + "betterproto[compiler]>=1.2.5", + "cloudcoil[codegen,kubernetes]>=0.5.8", + "dbus-fast>=2.44.5", + "grpclib>=0.4.8", + "pytest>=8.4.2", + "pytest-asyncio>=1.2.0", + "ruff>=0.13.3", + "setuptools>=80.9.0", +] + +[tool.basedpyright] +exclude = ["bazel-*", ".*"] +extraPaths = ["bazel-bin/tests"] +reportUnusedCallResult = false +typeCheckingMode = "recommended" + +[tool.pytest.ini_options] +addopts = [ + "--import-mode=importlib", + "-pno:cloudcoil", +] +asyncio_default_fixture_loop_scope = "function" +asyncio_mode = "auto" +log_cli = true +log_cli_level = "INFO" + +[tool.ruff.format] +quote-style = "single" + +[tool.ruff.lint] +extend-select = [ + "ANN", # flake8-annotations + "ERA", # eradicate + "I", # isort + "PT", # flake8-pytest-style + "TC", # flake8-type-checking +] + +[tool.ruff.lint.isort] +from-first = true +lines-between-types = 1 diff --git a/updatecli/updatecli.d/uv-deps.cue b/updatecli/updatecli.d/uv-deps.cue index 983a408..1f8675d 100644 --- a/updatecli/updatecli.d/uv-deps.cue +++ b/updatecli/updatecli.d/uv-deps.cue @@ -1,3 +1,5 @@ +import "regexp" + #NullOrEmpty: { input: string | null if input == null { @@ -23,15 +25,15 @@ sources: { targets: { for _, dep in #values.uvDeps { "uv_\(dep.name)": { - kind: "toml" + kind: "file" disablesourceinput: true dependson: ["source#uv_\(dep.name)"] spec: { #extras: (#NullOrEmpty & {input: dep.extras}).output #constraints: (#NullOrEmpty & {input: dep.constraints}).output - file: "pyproject.toml" - query: ".project.dependencies.(.=\(dep.name)\(#extras)\(#constraints))" - value: "\(dep.name)\(#extras)>={{ source `uv_\(dep.name)` }}" + file: "pyproject.toml" + matchpattern: regexp.QuoteMeta("\(dep.name)\(#extras)\(#constraints)") + replacepattern: "\(dep.name)\(#extras)>={{ source `uv_\(dep.name)` }}" } } } -- 2.51.2