Skip to content

Commit 8885235

Browse files
committed
Add zizmor to pre-commit and fix warnings
1 parent 6aa487d commit 8885235

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions: {}
6+
57
env:
68
FORCE_COLOR: 1
79
PIP_DISABLE_PIP_VERSION_CHECK: 1
810

9-
permissions:
10-
contents: read
11-
1211
jobs:
1312
lint:
1413
runs-on: ubuntu-latest
1514

1615
steps:
1716
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
1819
- uses: actions/setup-python@v5
1920
with:
2021
python-version: "3.x"

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Test
22

33
on: [push, pull_request, workflow_dispatch]
44

5-
permissions:
6-
contents: read
5+
permissions: {}
76

87
env:
98
FORCE_COLOR: 1
@@ -19,6 +18,8 @@ jobs:
1918

2019
steps:
2120
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
2223

2324
- name: Set up Python ${{ matrix.python-version }}
2425
uses: actions/setup-python@v5

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ repos:
2828
hooks:
2929
- id: actionlint
3030

31+
- repo: https://github.com/woodruffw/zizmor-pre-commit
32+
rev: v1.3.1
33+
hooks:
34+
- id: zizmor
35+
3136
- repo: https://github.com/tox-dev/pyproject-fmt
3237
rev: v2.5.0
3338
hooks:

0 commit comments

Comments
 (0)