Skip to content

Commit 5e8379d

Browse files
committed
Update linting and config
1 parent e22bdd9 commit 5e8379d

File tree

12 files changed

+65
-42
lines changed

12 files changed

+65
-42
lines changed

.coveragerc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:base"],
3+
"extends": ["config:base", ":semanticCommitsDisabled"],
44
"labels": ["changelog: skip", "dependencies"],
55
"packageRules": [
66
{

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ on:
1111
- published
1212
workflow_dispatch:
1313

14-
permissions:
15-
contents: read
14+
permissions: {}
1615

1716
env:
1817
FORCE_COLOR: 1
@@ -27,14 +26,15 @@ jobs:
2726
- uses: actions/checkout@v4
2827
with:
2928
fetch-depth: 0
29+
persist-credentials: false
3030

3131
- uses: hynek/build-and-inspect-python-package@v2
3232

3333
# Upload to Test PyPI on every commit on main.
3434
release-test-pypi:
3535
name: Publish in-dev package to test.pypi.org
3636
if: |
37-
github.repository_owner == 'hugovk'
37+
github.event.repository.fork == false
3838
&& github.event_name == 'push'
3939
&& github.ref == 'refs/heads/main'
4040
runs-on: ubuntu-latest
@@ -66,7 +66,7 @@ jobs:
6666
release-pypi:
6767
name: Publish released package to pypi.org
6868
if: |
69-
github.repository_owner == 'hugovk'
69+
github.event.repository.fork == false
7070
&& github.event.action == 'published'
7171
runs-on: ubuntu-latest
7272
needs: build-package

.github/workflows/labels.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Sync labels
22

3-
permissions:
4-
pull-requests: write
5-
63
on:
74
push:
85
branches:
@@ -13,9 +10,13 @@ on:
1310

1411
jobs:
1512
sync:
13+
permissions:
14+
pull-requests: write
1615
runs-on: ubuntu-latest
1716
steps:
1817
- uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
1920
- uses: micnncim/action-label-syncer@v1
2021
with:
2122
prune: false

.github/workflows/lint.yml

Lines changed: 5 additions & 4 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
7-
PIP_DISABLE_PIP_VERSION_CHECK: 1
8-
9-
permissions:
10-
contents: read
9+
RUFF_OUTPUT_FORMAT: github
1110

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/release-drafter.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ on:
1414
# types: [opened, reopened, synchronize]
1515
workflow_dispatch:
1616

17-
permissions:
18-
contents: read
19-
2017
jobs:
2118
update_release_draft:
22-
if: github.repository_owner == 'hugovk'
19+
if: github.event.repository.fork == false
2320
permissions:
2421
# write permission is required to create a GitHub Release
2522
contents: write

.github/workflows/require-pr-label.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ jobs:
1717
with:
1818
mode: minimum
1919
count: 1
20-
labels:
21-
"changelog: Added, changelog: Changed, changelog: Deprecated, changelog:
22-
Fixed, changelog: Removed, changelog: Security, changelog: skip"
20+
labels: |
21+
changelog: Added
22+
changelog: Changed
23+
changelog: Deprecated
24+
changelog: Fixed
25+
changelog: Removed
26+
changelog: Security
27+
changelog: skip

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ 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
9+
PIP_DISABLE_PIP_VERSION_CHECK: 1
1010

1111
jobs:
1212
test:
@@ -28,6 +28,8 @@ jobs:
2828

2929
steps:
3030
- uses: actions/checkout@v4
31+
with:
32+
persist-credentials: false
3133

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

.github/zizmor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configuration for the zizmor static analysis tool, run via pre-commit in CI
2+
# https://woodruffw.github.io/zizmor/configuration/
3+
rules:
4+
unpinned-uses:
5+
config:
6+
policies:
7+
"*": ref-pin

.pre-commit-config.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.12.2
3+
rev: v0.12.7
44
hooks:
5-
- id: ruff
5+
- id: ruff-check
66
args: [--exit-non-zero-on-fix]
77

88
- repo: https://github.com/psf/black-pre-commit-mirror
@@ -23,6 +23,7 @@ repos:
2323
- id: debug-statements
2424
- id: end-of-file-fixer
2525
- id: forbid-submodules
26+
- id: requirements-txt-fixer
2627
- id: trailing-whitespace
2728

2829
- repo: https://github.com/python-jsonschema/check-jsonschema
@@ -36,6 +37,11 @@ repos:
3637
hooks:
3738
- id: actionlint
3839

40+
- repo: https://github.com/woodruffw/zizmor-pre-commit
41+
rev: v1.11.0
42+
hooks:
43+
- id: zizmor
44+
3945
- repo: https://github.com/tox-dev/pyproject-fmt
4046
rev: v2.6.0
4147
hooks:
@@ -47,7 +53,7 @@ repos:
4753
- id: validate-pyproject
4854

4955
- repo: https://github.com/tox-dev/tox-ini-fmt
50-
rev: 1.5.0
56+
rev: 1.6.0
5157
hooks:
5258
- id: tox-ini-fmt
5359

0 commit comments

Comments
 (0)