Skip to content

Commit d57009a

Browse files
committed
📦⬆️ Drop support for Python 3.9 and simplify code
1 parent 8d7f73f commit d57009a

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

copier.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ year:
8686
8787
python_min:
8888
type: int
89-
help: Minimal minor version of python, i.e '9' or '13' for 3.9 or 3.13
90-
default: 13
89+
help: Minimal minor version of Python, i.e '13' for 3.13
90+
default: 10
9191
validator: >-
9292
{% if python_min < 8 %}Must be >= 8{% endif %}
9393

ctt.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ package_name = "delorian_car"
3535
package_description = "A car that flies."
3636
license = "MIT"
3737
year = 2015
38-
# python_min = default
3938
get_package_version_from_vcs = false
4039
has_cli = true
4140
jupyter_files = "forbid"
@@ -78,8 +77,8 @@ _extra_tasks = [
7877
[output.".ctt/package_version_from_vcs"]
7978
get_package_version_from_vcs = true
8079

81-
[output.".ctt/python3.9"]
82-
python_min = 9
80+
[output.".ctt/python3.10"]
81+
python_min = 10
8382
get_package_version_from_vcs = true
8483
has_cli = true
8584
jupyter_files = "strip_outputs"

project_name/.pre-commit-config.yaml.jinja

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,10 @@ repos:
123123
- mdformat-gfm-alerts
124124

125125
# reStructuredText files
126-
{%- if python_min >= 10 %}
127126
- repo: https://github.com/PyCQA/doc8
128127
rev: <placeholder_until_update_deps>
129128
hooks:
130129
- id: doc8
131-
{%- endif %}
132130

133131
# Python files
134132
{%- if format_tool == "black" %}

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

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

66
from typing import Annotated
7-
{%- if python_min < 10 -%}
8-
, Optional
9-
{%- endif %}
107

118
import typer
129
from click.exceptions import UsageError
@@ -27,11 +24,7 @@ def callback(
2724
ctx: typer.Context,
2825
*,
2926
version: Annotated[ # noqa: ARG001
30-
{%- if python_min < 10 %}
31-
Optional[bool], # noqa: FA100 (needed for typer)
32-
{%- else %}
3327
bool | None,
34-
{%- endif %}
3528
typer.Option(
3629
"--version",
3730
"-V",

0 commit comments

Comments
 (0)