🔧 Simplify linting script

This commit is contained in:
Nikolai R Kristiansen
2022-07-19 13:25:20 +02:00
parent b2574846eb
commit 2f8deaeefb
2 changed files with 3 additions and 16 deletions

View File

@@ -5,15 +5,13 @@ repos:
hooks:
- id: black
name: black
entry: pipenv run black
exclude: model_config.py
entry: black
args: [--check]
language: system
require_serial: true
types: [python]
- id: isort
name: isort
entry: pipenv run isort
entry: isort
args: [--check-only]
language: system
types: [python]

View File

@@ -1,15 +1,4 @@
#!/usr/bin/env bash
set -eu
SRC_DIR="build_versions"
pids=();
black --check "$SRC_DIR" &
pids+=($!)
isort --diff "$SRC_DIR" &
pids+=($!)
ret=0;
for i in "${pids[@]}"; do
if ! wait "$i"; then ret=1; fi
done
exit "$ret"
pre-commit run -a