-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
38 lines (35 loc) · 1.45 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-docstring-first # checks if docstring is before code
- id: check-json # checks if json files are valid
- id: check-added-large-files # checks if large files were added
- id: check-merge-conflict # checks if all merge conflicts were resolved
- id: check-yaml # checks if yaml files are valid
- id: debug-statements # checks if debug statements are to be commited
- id: end-of-file-fixer # fixes missing line ending in end of file
- id: mixed-line-ending # fixes line files line ending
args: [--fix=lf]
- id: trailing-whitespace # removes trailing whitespaces from text files
- repo: https://github.com/ambv/black # formats Python code
rev: 22.8.0
hooks:
- id: black
args: [--line-length=100]
- repo: https://github.com/pycqa/flake8 # static tests Python code
rev: 5.0.4
hooks:
- id: flake8
# pylint does dynamic testing using data from imported modules
# thus the modules need to be found by it
# the easiest way to accomplish this is using it as a local hook
# see https://stackoverflow.com/questions/61238318/pylint-and-pre-commit-hook-unable-to-import
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
require_serial: true