Skip to content

Commit 465fcbe

Browse files
committed
chore: fix Python 3.8 compatibility issue
1 parent 5cb20df commit 465fcbe

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ENV PIPX_DEFAULT_PYTHON=/usr/local/bin/python
2222
RUN pipx install pdm==2.12.4
2323

2424
# Install pre-commit
25-
RUN pipx install pre-commit==3.6.2
25+
RUN pipx install pre-commit==3.5.0
2626

2727
# Create a non-root user with sudo permission
2828
ARG USERNAME=ss-python

.renovaterc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
]
5050
},
5151
"semanticCommitScope": "copier-template"
52+
},
53+
{
54+
"enabled": false,
55+
"matchCurrentVersion": "3.5.0",
56+
"matchDepNames": [
57+
"pre-commit"
58+
]
5259
}
5360
]
5461
}

template/.devcontainer/Dockerfile.jinja

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[% from pathjoin("includes", "version_compare.jinja") import version_higher_than -%]
12
ARG PYTHON_VERSION={{ default_py }}
23

34
########################################################################################
@@ -22,7 +23,11 @@ ENV PIPX_DEFAULT_PYTHON=/usr/local/bin/python
2223
RUN pipx install pdm==2.12.4
2324

2425
# Install pre-commit
26+
[%- if not version_higher_than(min_py, "3.9") %]
27+
RUN pipx install pre-commit==3.5.0
28+
[%- else %]
2529
RUN pipx install pre-commit==3.6.2
30+
[%- endif %]
2631

2732
# Create a non-root user with sudo permission
2833
ARG USERNAME={{ repo_name }}

template/.renovaterc.json.jinja

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[% from pathjoin("includes", "version_compare.jinja") import version_higher_than -%]
12
{
23
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
34
"customManagers": [
@@ -54,5 +55,14 @@
5455
},
5556
"semanticCommitScope": "copier-template"
5657
}
58+
[%- if not version_higher_than(min_py, "3.9") %],
59+
{
60+
"enabled": false,
61+
"matchCurrentVersion": "3.5.0",
62+
"matchDepNames": [
63+
"pre-commit"
64+
]
65+
}
66+
[%- endif %]
5767
]
5868
}

0 commit comments

Comments
 (0)