Commit a77778dd authored by payno's avatar payno Committed by payno
Browse files

[CI] add black hook

parent 89fb2905
stages:
- style
- build
- test_library
- test_notbooks
......@@ -10,6 +11,19 @@ variables:
no_proxy: .esrf.fr,localhost
ORANGE_WEB_LOG: 'False'
# style
check_style:
stage: style
image: docker-registry.esrf.fr/dau/tomwer:python3.8_buster_pyqt5_sphinx
before_script:
- pip install black
script:
- pip install -r requirements.txt
# run black
- LC_ALL=C.UTF-8 black --check --safe .
# build
doc:
stage: build
......
repos:
- repo: https://github.com/psf/black
rev: 18.6b4
hooks:
- id: black
language_version: python3
#!/bin/bash
# This script installs a pre-commit hook on the local repository
# It allows black to run before any git commit.
# Install pre-commit, with a local install fallback
pip install --quiet --upgrade pre-commit 2>/dev/null \
|| pip install --quiet --user --upgrade pre-commit
# Install the pre-commit hook on the local repository
pre-commit install
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment