Skip to content

Commit 7dabe60

Browse files
committed
hadolint pre commit install check
1 parent 36e48f2 commit 7dabe60

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- name: Install uv
2222
uses: astral-sh/setup-uv@v5
23-
- name: Set up Python 3.12
24-
run: uv python install 3.12
23+
- name: Set up Python 3.13
24+
run: uv python install 3.13
2525
- name: Install dependencies
2626
run: uv sync --dev
2727
- name: Tests (pytest)

.pre-commit-config.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: 24.4.2
44
hooks:
55
- id: black
6-
language_version: python3.10
6+
language_version: python3.13
77

88
- repo: https://github.com/Yelp/detect-secrets
99
rev: v1.4.0
@@ -18,7 +18,10 @@ repos:
1818
- id: isort
1919
args: [ "--profile", "black", "--filter-files", "--line-length=100" ]
2020

21-
- repo: https://github.com/hadolint/hadolint
22-
rev: v2.12.0
21+
- repo: local
2322
hooks:
2423
- id: hadolint
24+
name: Lint Dockerfiles
25+
language: system
26+
files: (^|/)Dockerfile([^/]*)?$
27+
entry: bash -c 'if command -v hadolint >/dev/null 2>&1; then hadolint "$@"; else echo "hadolint not installed, skipping"; fi' --

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build stage
22
# When upgrading Python versions, update '.python-version' to match
3-
FROM python:3.12.11 AS builder
3+
FROM python:3.13.11 AS builder
44

55
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
66

@@ -24,7 +24,7 @@ RUN uv sync --locked --no-dev --no-editable
2424
################################################################################
2525
# Runtime stage
2626
# When upgrading Python versions, update '.python-version' to match
27-
FROM python:3.12.11-slim
27+
FROM python:3.13.11-slim
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV LANG=C.UTF-8

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ profile = "black"
3939
[tool.black]
4040
line-length = 100
4141
skip-string-normalization = true
42-
target_version = ['py312']
42+
target_version = ['py313']
4343
include = '\.pyi?$'
4444
exclude = '''
4545
(

0 commit comments

Comments
 (0)