From 1d655698c81d261c5c87df0ce06acad284205f35 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 06:48:04 +0000 Subject: [PATCH] style: autoformat with pre-commit --- docs/comparisons.md | 2 + docs/configuring.md | 19 +++-- flake.lock | 165 ++++++++------------------------------------ 3 files changed, 38 insertions(+), 148 deletions(-) diff --git a/docs/comparisons.md b/docs/comparisons.md index bb9961cb8..6cbc6caf8 100644 --- a/docs/comparisons.md +++ b/docs/comparisons.md @@ -36,6 +36,7 @@ docs! We don't want to be biased, but it's easy that we tend to be: [ejs]: https://ejs.co/ [^1]: The file itself can [include other YAML files][include-other-yaml-files]. + [^2]: Git repo is recommended to be able to use advanced features such as template tagging and smart updates. @@ -49,6 +50,7 @@ docs! We don't want to be biased, but it's easy that we tend to be: and extract smart diffs between them. [^5]: Context hooks are provided through the [`ContextHook` extension][context-hook]. + [^6]: Updates are possible through [Cruft][cruft]. [context-hook]: diff --git a/docs/configuring.md b/docs/configuring.md index 636f04ea3..d5cd48def 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -1189,8 +1189,8 @@ Migrations are like [tasks][tasks], but each item can have additional keys: - **command**: The migration command to run - **version** (optional): Indicates the version that the template update has to go - through to trigger this migration. It is evaluated using [PEP 440][]. If no version - is specified the migration will run on every update. + through to trigger this migration. It is evaluated using [PEP 440][]. If no version is + specified the migration will run on every update. - **when** (optional): Specifies a condition that needs to hold for the task to run. By default, a migration will run in the after upgrade stage. - **working_directory** (optional): Specifies the directory in which the command will @@ -1224,12 +1224,11 @@ processes will receive these variables: - `_version_pep440_from`/`$VERSION_PEP440_FROM`, `_version_pep440_to`/`$VERSION_PEP440_TO`, `_version_pep440_current`/`$VERSION_PEP440_CURRENT`: Same as the above, but - normalized into a standard [PEP 440][] version. In Jinja templates these are - represented as - [packaging.version.Version](https://packaging.pypa.io/en/stable/version.html#packaging.version.Version) - objects and allow access to their attributes. As environment variables they are - represented as strings. If you use variables to perform migrations, you probably - will prefer to use these variables. + normalized into a standard [PEP 440][] version. In Jinja templates these are represented + as [packaging.version.Version](https://packaging.pypa.io/en/stable/version.html#packaging.version.Version) + objects and allow access to their attributes. As environment variables they are represented + as strings. If you use variables to perform migrations, you probably will prefer to use + these variables. [git describe]: https://git-scm.com/docs/git-describe [pep 440]: https://www.python.org/dev/peps/pep-0440/ @@ -1269,8 +1268,8 @@ can't be used in jinja templates. Specifies the minimum required version of Copier to generate a project from this template. The version must be follow the [PEP 440][] syntax. Upon generating or updating -a project, if the installed version of Copier is less than the required one, the -generation will be aborted and an error will be shown to the user. +a project, if the installed version of Copier is less than the required one, the generation +will be aborted and an error will be shown to the user. !!! info diff --git a/flake.lock b/flake.lock index f8b9dc4ac..4e8afa719 100644 --- a/flake.lock +++ b/flake.lock @@ -3,18 +3,9 @@ "cachix": { "inputs": { "devenv": "devenv_2", - "flake-compat": [ - "devenv", - "flake-compat" - ], - "git-hooks": [ - "devenv", - "pre-commit-hooks" - ], - "nixpkgs": [ - "devenv", - "nixpkgs" - ] + "flake-compat": ["devenv", "flake-compat"], + "git-hooks": ["devenv", "pre-commit-hooks"], + "nixpkgs": ["devenv", "nixpkgs"] }, "locked": { "lastModified": 1726520618, @@ -33,24 +24,9 @@ "cachix_2": { "inputs": { "devenv": "devenv_3", - "flake-compat": [ - "devenv", - "cachix", - "devenv", - "flake-compat" - ], - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "nixpkgs" - ], - "pre-commit-hooks": [ - "devenv", - "cachix", - "devenv", - "pre-commit-hooks" - ] + "flake-compat": ["devenv", "cachix", "devenv", "flake-compat"], + "nixpkgs": ["devenv", "cachix", "devenv", "nixpkgs"], + "pre-commit-hooks": ["devenv", "cachix", "devenv", "pre-commit-hooks"] }, "locked": { "lastModified": 1712055811, @@ -92,22 +68,10 @@ "devenv_2": { "inputs": { "cachix": "cachix_2", - "flake-compat": [ - "devenv", - "cachix", - "flake-compat" - ], + "flake-compat": ["devenv", "cachix", "flake-compat"], "nix": "nix_2", - "nixpkgs": [ - "devenv", - "cachix", - "nixpkgs" - ], - "pre-commit-hooks": [ - "devenv", - "cachix", - "git-hooks" - ] + "nixpkgs": ["devenv", "cachix", "nixpkgs"], + "pre-commit-hooks": ["devenv", "cachix", "git-hooks"] }, "locked": { "lastModified": 1723156315, @@ -125,23 +89,11 @@ }, "devenv_3": { "inputs": { - "flake-compat": [ - "devenv", - "cachix", - "devenv", - "cachix", - "flake-compat" - ], + "flake-compat": ["devenv", "cachix", "devenv", "cachix", "flake-compat"], "nix": "nix", "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix", - "pre-commit-hooks": [ - "devenv", - "cachix", - "devenv", - "cachix", - "pre-commit-hooks" - ] + "pre-commit-hooks": ["devenv", "cachix", "devenv", "cachix", "pre-commit-hooks"] }, "locked": { "lastModified": 1708704632, @@ -206,11 +158,7 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": [ - "devenv", - "nix", - "nixpkgs" - ] + "nixpkgs-lib": ["devenv", "nix", "nixpkgs"] }, "locked": { "lastModified": 1712014858, @@ -296,11 +244,7 @@ }, "gitignore": { "inputs": { - "nixpkgs": [ - "devenv", - "pre-commit-hooks", - "nixpkgs" - ] + "nixpkgs": ["devenv", "pre-commit-hooks", "nixpkgs"] }, "locked": { "lastModified": 1709087332, @@ -335,14 +279,7 @@ "nix": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "cachix", - "devenv", - "nixpkgs" - ], + "nixpkgs": ["devenv", "cachix", "devenv", "cachix", "devenv", "nixpkgs"], "nixpkgs-regression": "nixpkgs-regression" }, "locked": { @@ -388,10 +325,7 @@ }, "nix-github-actions_2": { "inputs": { - "nixpkgs": [ - "poetry2nix", - "nixpkgs" - ] + "nixpkgs": ["poetry2nix", "nixpkgs"] }, "locked": { "lastModified": 1729742964, @@ -409,18 +343,8 @@ }, "nix_2": { "inputs": { - "flake-compat": [ - "devenv", - "cachix", - "devenv", - "flake-compat" - ], - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "nixpkgs" - ], + "flake-compat": ["devenv", "cachix", "devenv", "flake-compat"], + "nixpkgs": ["devenv", "cachix", "devenv", "nixpkgs"], "nixpkgs-regression": "nixpkgs-regression_2" }, "locked": { @@ -440,10 +364,7 @@ }, "nix_3": { "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], + "flake-compat": ["devenv", "flake-compat"], "flake-parts": "flake-parts", "libgit2": "libgit2", "nixpkgs": "nixpkgs_2", @@ -612,14 +533,7 @@ "inputs": { "flake-utils": "flake-utils", "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "cachix", - "devenv", - "nixpkgs" - ] + "nixpkgs": ["devenv", "cachix", "devenv", "cachix", "devenv", "nixpkgs"] }, "locked": { "lastModified": 1692876271, @@ -639,9 +553,7 @@ "inputs": { "flake-utils": "flake-utils_4", "nix-github-actions": "nix-github-actions_2", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": ["nixpkgs"], "systems": "systems_4", "treefmt-nix": "treefmt-nix" }, @@ -661,25 +573,11 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": [ - "devenv", - "nix" - ], + "flake-compat": ["devenv", "nix"], "flake-utils": "flake-utils_2", - "gitignore": [ - "devenv", - "nix" - ], - "nixpkgs": [ - "devenv", - "nix", - "nixpkgs" - ], - "nixpkgs-stable": [ - "devenv", - "nix", - "nixpkgs" - ] + "gitignore": ["devenv", "nix"], + "nixpkgs": ["devenv", "nix", "nixpkgs"], + "nixpkgs-stable": ["devenv", "nix", "nixpkgs"] }, "locked": { "lastModified": 1712897695, @@ -697,15 +595,9 @@ }, "pre-commit-hooks_2": { "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], + "flake-compat": ["devenv", "flake-compat"], "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], + "nixpkgs": ["devenv", "nixpkgs"], "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -792,10 +684,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": [ - "poetry2nix", - "nixpkgs" - ] + "nixpkgs": ["poetry2nix", "nixpkgs"] }, "locked": { "lastModified": 1730120726,