Skip to content

Commit ddc3f4b

Browse files
committed
refactor: rename variable
1 parent b7ccc77 commit ddc3f4b

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

changelog.d/+6825c8e4.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Rename `build_backend` to `backend`.

copier.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ license:
117117
MIT License: MIT
118118
Mozilla Public License 2.0: MPL-2.0
119119

120-
build_backend:
120+
backend:
121121
type: str
122122
help: Which build backend do you want to use?
123123
default: hatch
@@ -130,14 +130,14 @@ hatch_plugins:
130130
help: Which Hatch plugins do you want to use?
131131
multiselect: true
132132
default: [hatch-vcs]
133-
when: "{{ build_backend == 'hatch' }}"
133+
when: "{{ backend == 'hatch' }}"
134134
choices:
135135
hatch-vcs: hatch-vcs
136136

137137
dynamic_version:
138138
type: bool
139139
help: Whether the version is dynamic.
140-
default: "{{ build_backend == 'hatch' and 'hatch-vcs' in hatch_plugins }}"
140+
default: "{{ backend == 'hatch' and 'hatch-vcs' in hatch_plugins }}"
141141
when: false
142142

143143
entry_points:

template/pyproject.toml.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
22
{%- with requires = [] %}
3-
{%- if build_backend == 'hatch' %}
3+
{%- if backend == 'hatch' %}
44
build-backend = "hatchling.build"
55
{%- if 'hatch-vcs' in hatch_plugins %}{% do requires.append('hatch-vcs>=0.4') %}{% endif %}
66
{%- do requires.append('hatchling>=1.27') %}
7-
{%- elif build_backend == 'uv' %}
7+
{%- elif backend == 'uv' %}
88
build-backend = "uv_build"
99
{%- do requires.append('uv-build>=0.7.19,<0.8') %}
1010
{%- endif %}
@@ -117,7 +117,7 @@ release = [
117117
"uv>=0.7.7",
118118
{%- endif %}
119119
]
120-
{% if build_backend == 'hatch' and hatch_plugins %}
120+
{% if backend == 'hatch' and hatch_plugins %}
121121
[tool.hatch]
122122
{%- if 'hatch-vcs' in hatch_plugins %}
123123
build.hooks.vcs.version-file = "src/{{ package_name }}/VERSION.txt"

0 commit comments

Comments
 (0)