Commit 8446a493 authored by payno's avatar payno

add black hook

parent d0491ca3
Pipeline #31638 canceled with stages
in 3 minutes and 58 seconds
stages:
- style
- test
variables:
http_proxy: http://proxy.esrf.fr:3128
https_proxy: http://proxy.esrf.fr:3128
no_proxy: .esrf.fr,localhost
# style
check_style:
stage: style
image: docker-registry.esrf.fr/dau/est:python3.7_stretch_pyqt5_gtk3_wxpython
before_script:
- pip install black
script:
- pip install -r requirements-dev.txt
# run black
- LC_ALL=C.UTF-8 black --check --safe .
.build_template: &test_linux_template_pymca
stage: test
before_script:
......
#!/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
Markdown is supported
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