Skip to content

Commit 8fbb170

Browse files
committed
refactor: rename python_minor to python_min
1 parent a9899b2 commit 8fbb170

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

copier.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ year:
9090
{% if year <= 999 %}Must be 4 digits{% endif %}
9191
{% if year > 9999 %}Must be 4 digits{% endif %}
9292
93-
python_minor:
93+
python_min:
9494
type: int
9595
help: Minimal minor version of python, i.e '9' or '13' for 3.9 or 3.13
9696
default: 13
9797
validator: >-
98-
{% if python_minor < 0 %}Must be >= 0{% endif %}
98+
{% if python_min < 0 %}Must be >= 0{% endif %}
9999
100100
get_package_version_from_vcs:
101101
type: bool

ctt.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ package_name = "delorian_car"
2727
package_description = "A car that flies."
2828
license = "MIT"
2929
year = 2015
30-
# python_minor = default
30+
# python_min = default
3131
get_package_version_from_vcs = false
3232
has_cli = true
3333
jupyter_files = "forbid"
@@ -40,7 +40,7 @@ has_cli = false
4040
get_package_version_from_vcs = true
4141

4242
[output.".ctt/python3.9"]
43-
python_minor = 9
43+
python_min = 9
4444
get_package_version_from_vcs = true
4545
has_cli = true
4646
jupyter_files = "strip_outputs"

project_name/.github/workflows/ci.yml.jinja

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ jobs:
6565
- "highest"
6666
- "lowest"
6767
python-version:
68-
{%- if python_minor <= 9 %}
68+
{%- if python_min <= 9 %}
6969
- "3.9"
7070
{%- endif %}
71-
{%- if python_minor <= 10 %}
71+
{%- if python_min <= 10 %}
7272
- "3.10"
7373
{%- endif %}
74-
{%- if python_minor <= 11 %}
74+
{%- if python_min <= 11 %}
7575
- "3.11"
7676
{%- endif %}
77-
{%- if python_minor <= 12 %}
77+
{%- if python_min <= 12 %}
7878
- "3.12"
7979
{%- endif %}
80-
{%- if python_minor <= 13 %}
80+
{%- if python_min <= 13 %}
8181
- "3.13"
8282
{%- endif %}
8383
allow-failure: [false]

project_name/.python-version.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.{{ python_minor }}
1+
3.{{ python_min }}

project_name/pyproject.toml.jinja

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ description = "{{ package_description }}"
1414
license = "{{ license }}"
1515
license-files = ["LICEN[CS]E.*"]
1616
readme = "README.md"
17-
requires-python = ">=3.{{ python_minor }}"
17+
requires-python = ">=3.{{ python_min }}"
1818
authors = [
1919
{name = "{{ user_name }}", email = "{{ user_email }}"}
2020
]
@@ -32,22 +32,22 @@ classifiers = [
3232
"Programming Language :: Python",
3333
"Programming Language :: Python :: 3",
3434
"Programming Language :: Python :: 3 :: Only",
35-
{%- if python_minor <= 9 %}
35+
{%- if python_min <= 9 %}
3636
"Programming Language :: Python :: 3.9",
3737
{%- endif %}
38-
{%- if python_minor <= 10 %}
38+
{%- if python_min <= 10 %}
3939
"Programming Language :: Python :: 3.10",
4040
{%- endif %}
41-
{%- if python_minor <= 11 %}
41+
{%- if python_min <= 11 %}
4242
"Programming Language :: Python :: 3.11",
4343
{%- endif %}
44-
{%- if python_minor <= 12 %}
44+
{%- if python_min <= 12 %}
4545
"Programming Language :: Python :: 3.12",
4646
{%- endif %}
47-
{%- if python_minor <= 13 %}
47+
{%- if python_min <= 13 %}
4848
"Programming Language :: Python :: 3.13",
4949
{%- endif %}
50-
{%- if python_minor <= 14 %}
50+
{%- if python_min <= 14 %}
5151
"Programming Language :: Python :: 3.14",
5252
{%- endif %}
5353
"Typing :: Typed",
@@ -177,7 +177,7 @@ mypy_path = "stubs"
177177
# verify the config file
178178
warn_unused_configs = true
179179
# set the platform
180-
python_version = "3.{{ python_minor }}"
180+
python_version = "3.{{ python_min }}"
181181
# enable checks [last updated: mypy 1.15]
182182
strict = true
183183
disallow_any_explicit = true
@@ -267,7 +267,7 @@ flake8-comprehensions.allow-dict-calls-with-keyword-arguments = true
267267

268268

269269
[tool.pylint]
270-
py-version = "3.{{ python_minor }}"
270+
py-version = "3.{{ python_min }}"
271271
{%- if get_package_version_from_vcs %}
272272
ignore-paths = [".*/_version.py"]
273273
{%- endif %}

project_name/src/{{package_name}}/{% if has_cli %}cli.py{% endif %}.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Currently, a placeholder until the real CLI will be added.
44
"""
55

66
from typing import Annotated
7-
{%- if python_minor < 10 -%}
7+
{%- if python_min < 10 -%}
88
, Optional
99
{%- endif %}
1010

@@ -27,7 +27,7 @@ def callback(
2727
ctx: typer.Context,
2828
*,
2929
version: Annotated[ # noqa: ARG001
30-
{%- if python_minor < 10 %}
30+
{%- if python_min < 10 %}
3131
Optional[bool], # noqa: FA100 (needed for typer)
3232
{%- else %}
3333
bool | None,

0 commit comments

Comments
 (0)