Skip to content

Commit

Permalink
chore: fix Python 3.8 compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Mar 6, 2024
1 parent 5cb20df commit adfc430
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV PIPX_DEFAULT_PYTHON=/usr/local/bin/python
RUN pipx install pdm==2.12.4

# Install pre-commit
RUN pipx install pre-commit==3.6.2
RUN pipx install pre-commit==3.5.0

# Create a non-root user with sudo permission
ARG USERNAME=ss-python
Expand Down
6 changes: 6 additions & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
]
},
"semanticCommitScope": "copier-template"
},
{
"enabled": false,
"matchPackageNames": [
"pre-commit"
]
}
]
}
5 changes: 5 additions & 0 deletions template/.devcontainer/Dockerfile.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[% from pathjoin("includes", "version_compare.jinja") import version_higher_than -%]
ARG PYTHON_VERSION={{ default_py }}

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

# Install pre-commit
[%- if not version_higher_than(min_py, "3.9") %]
RUN pipx install pre-commit==3.5.0
[%- else %]
RUN pipx install pre-commit==3.6.2
[%- endif %]

# Create a non-root user with sudo permission
ARG USERNAME={{ repo_name }}
Expand Down
10 changes: 10 additions & 0 deletions template/.renovaterc.json.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[% from pathjoin("includes", "version_compare.jinja") import version_higher_than -%]
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customManagers": [
Expand Down Expand Up @@ -54,5 +55,14 @@
},
"semanticCommitScope": "copier-template"
}
[%- if not version_higher_than(min_py, "3.9") %],
{
"enabled": false,
"matchCurrentVersion": "3.5.0",
"matchPackageNames": [
"pre-commit"
]
}
[%- endif %]
]
}

0 comments on commit adfc430

Please sign in to comment.