jenkins-job-builder/.pre-commit-config.yaml
Adam Romanek 1590466de9 Fix CI for Python 2
Black dropped Python 2 support in 22.1.0. Unfortunately we can't pin
the version as <22.1.0 becasue in the past Black was versioned using
just main.major, not main.major.minor, and they were only releasing beta
versions, hence the 'b' suffix.

Pluggy 1.0.0 dropped Python 2 support.

It seams JJB should drop support for Python 2 too. Otherwise it will
be harder and harder to maintain dependencies...

Change-Id: I13b82a02bb50ab46183ff04aae521b44e475f743
2022-02-11 13:03:56 +01:00

26 lines
762 B
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/python/black.git
rev: 19.3b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.2.3
hooks:
- id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.7.8
hooks:
- id: flake8
args: ['--config=setup.cfg']
types: [python]
additional_dependencies:
- flake8>=3.7.8
- flake8-black
- black==21.12b0 # the last version that supports Python 2
language_version: python3