style: autoformat with pre-commit

This commit is contained in:
autofix-ci[bot] 2025-02-16 07:45:13 +00:00 committed by Jairo Llopis
parent 896a476179
commit 3ae6b78be3
3 changed files with 25 additions and 59 deletions

View File

@ -37,6 +37,7 @@ docs! We don't want to be biased, but it's easy that we tend to be:
[ejs]: https://ejs.co/ [ejs]: https://ejs.co/
[^1]: The file itself can [include other YAML files][include-other-yaml-files]. [^1]: The file itself can [include other YAML files][include-other-yaml-files].
[^2]: [^2]:
Git repo is recommended to be able to use advanced features such as template tagging Git repo is recommended to be able to use advanced features such as template tagging
and smart updates. and smart updates.
@ -50,6 +51,7 @@ docs! We don't want to be biased, but it's easy that we tend to be:
and extract smart diffs between them. and extract smart diffs between them.
[^5]: Context hooks are provided through the [`ContextHook` extension][context-hook]. [^5]: Context hooks are provided through the [`ContextHook` extension][context-hook].
[^6]: Updates are possible through [Cruft][cruft]. [^6]: Updates are possible through [Cruft][cruft].
[context-hook]: [context-hook]:

View File

@ -1260,8 +1260,8 @@ Migrations are like [tasks][tasks], but each item can have additional keys:
- **command**: The migration command to run - **command**: The migration command to run
- **version** (optional): Indicates the version that the template update has to go - **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 through to trigger this migration. It is evaluated using [PEP 440][]. If no version is
is specified the migration will run on every update. specified the migration will run on every update.
- **when** (optional): Specifies a condition that needs to hold for the task to run. - **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. By default, a migration will run in the after upgrade stage.
- **working_directory** (optional): Specifies the directory in which the command will - **working_directory** (optional): Specifies the directory in which the command will
@ -1295,12 +1295,11 @@ processes will receive these variables:
- `_version_pep440_from`/`$VERSION_PEP440_FROM`, - `_version_pep440_from`/`$VERSION_PEP440_FROM`,
`_version_pep440_to`/`$VERSION_PEP440_TO`, `_version_pep440_to`/`$VERSION_PEP440_TO`,
`_version_pep440_current`/`$VERSION_PEP440_CURRENT`: Same as the above, but `_version_pep440_current`/`$VERSION_PEP440_CURRENT`: Same as the above, but
normalized into a standard [PEP 440][] version. In Jinja templates these are normalized into a standard [PEP 440][] version. In Jinja templates these are represented
represented as as [packaging.version.Version](https://packaging.pypa.io/en/stable/version.html#packaging.version.Version)
[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
objects and allow access to their attributes. As environment variables they are as strings. If you use variables to perform migrations, you probably will prefer to use
represented as strings. If you use variables to perform migrations, you probably these variables.
will prefer to use these variables.
[git describe]: https://git-scm.com/docs/git-describe [git describe]: https://git-scm.com/docs/git-describe
[pep 440]: https://www.python.org/dev/peps/pep-0440/ [pep 440]: https://www.python.org/dev/peps/pep-0440/
@ -1340,8 +1339,8 @@ can't be used in jinja templates.
Specifies the minimum required version of Copier to generate a project from this 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 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 a project, if the installed version of Copier is less than the required one, the generation
generation will be aborted and an error will be shown to the user. will be aborted and an error will be shown to the user.
!!! info !!! info

63
flake.lock generated
View File

@ -2,15 +2,9 @@
"nodes": { "nodes": {
"cachix": { "cachix": {
"inputs": { "inputs": {
"devenv": [ "devenv": ["devenv"],
"devenv" "flake-compat": ["devenv"],
], "git-hooks": ["devenv"],
"flake-compat": [
"devenv"
],
"git-hooks": [
"devenv"
],
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
@ -83,11 +77,7 @@
}, },
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": ["devenv", "nix", "nixpkgs"]
"devenv",
"nix",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1712014858, "lastModified": 1712014858,
@ -140,14 +130,9 @@
}, },
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": ["devenv"],
"devenv"
],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": ["devenv", "nixpkgs"]
"devenv",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1737465171, "lastModified": 1737465171,
@ -165,11 +150,7 @@
}, },
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": ["devenv", "git-hooks", "nixpkgs"]
"devenv",
"git-hooks",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1709087332, "lastModified": 1709087332,
@ -203,21 +184,13 @@
}, },
"nix": { "nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": ["devenv"],
"devenv"
],
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"libgit2": "libgit2", "libgit2": "libgit2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-23-11": [ "nixpkgs-23-11": ["devenv"],
"devenv" "nixpkgs-regression": ["devenv"],
], "pre-commit-hooks": ["devenv"]
"nixpkgs-regression": [
"devenv"
],
"pre-commit-hooks": [
"devenv"
]
}, },
"locked": { "locked": {
"lastModified": 1734114420, "lastModified": 1734114420,
@ -236,10 +209,7 @@
}, },
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": ["poetry2nix", "nixpkgs"]
"poetry2nix",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1729742964, "lastModified": 1729742964,
@ -321,9 +291,7 @@
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": [ "nixpkgs": ["nixpkgs"],
"nixpkgs"
],
"systems": "systems_3", "systems": "systems_3",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
@ -397,10 +365,7 @@
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": ["poetry2nix", "nixpkgs"]
"poetry2nix",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1730120726, "lastModified": 1730120726,