mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-01-11 11:11:17 +03:00
Replace pre-commit with prek
This commit is contained in:
parent
2ebb3e9964
commit
080afe1bf7
17
.github/workflows/lint.yml
vendored
17
.github/workflows/lint.yml
vendored
|
|
@ -2,18 +2,17 @@ name: Lint
|
|||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
lint:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
@ -24,13 +23,13 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: pre-commit cache
|
||||
- name: prek cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
|
||||
path: ~/.cache/prek
|
||||
key: lint-prek-${{ hashFiles('**/.pre-commit-config.yaml') }}
|
||||
restore-keys: |
|
||||
lint-pre-commit-
|
||||
lint-prek-
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
|
|
@ -50,7 +49,7 @@ jobs:
|
|||
- name: Lint
|
||||
run: tox -e lint
|
||||
env:
|
||||
PRE_COMMIT_COLOR: always
|
||||
PREK_COLOR: always
|
||||
|
||||
- name: Mypy
|
||||
run: tox -e mypy
|
||||
|
|
|
|||
1
.github/zizmor.yml
vendored
1
.github/zizmor.yml
vendored
|
|
@ -1,4 +1,3 @@
|
|||
# Configuration for the zizmor static analysis tool, run via pre-commit in CI
|
||||
# https://docs.zizmor.sh/configuration/
|
||||
rules:
|
||||
obfuscation:
|
||||
|
|
|
|||
7
tox.ini
7
tox.ini
|
|
@ -3,6 +3,7 @@ requires =
|
|||
tox>=4.2
|
||||
env_list =
|
||||
lint
|
||||
mypy
|
||||
py{py3, 315, 314, 313, 312, 311, 310}
|
||||
|
||||
[testenv]
|
||||
|
|
@ -18,11 +19,11 @@ commands =
|
|||
skip_install = true
|
||||
deps =
|
||||
check-manifest
|
||||
pre-commit
|
||||
prek
|
||||
pass_env =
|
||||
PRE_COMMIT_COLOR
|
||||
PREK_COLOR
|
||||
commands =
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
prek run --all-files --show-diff-on-failure
|
||||
check-manifest
|
||||
|
||||
[testenv:mypy]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user