forked from SchweizerischeBundesbahnen/rsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
73 lines (70 loc) · 3.16 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.3.5
hooks:
- id: reorder-python-imports
args: [ --application-directories, 'src/python:src/asp:tests']
- repo: https://github.com/myint/docformatter
rev: v1.3
hooks:
- id: docformatter
- repo: https://github.com/psf/black
# https://github.com/psf/black/issues/875
rev: 19.10b0
hooks:
- id: black
exclude: 'Jenkinsfile'
args: [--line-length, '160']
# https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click
additional_dependencies: ["click==8.0.2"]
- repo: https://github.com/PyCQA/flake8
rev: 3.7.9
hooks:
- id: flake8
# https://dev.to/mmphego/why-you-need-to-stop-using-git-hooks-41
additional_dependencies: [
# TODO SIM-675 enable flake8-docstrings
# flake8-2020, # flake8 plugin which checks for misuse of `sys.version` or `sys.version_info`
flake8-absolute-import, # uses a simple check of the AST for each from x import y statement to flag relative imports.
flake8-blind-except, # A flake8 extension that checks for blind except: statements
flake8-builtins, # checks that there is no name collision between your code and the Python builtin variables.
flake8-bugbear, # A plugin for flake8 finding likely bugs and design problems in your program.
flake8-builtins, # Check for python builtins being used as variables or parameters.
#flake8-comprehensions, # It helps you write a better list/set/dict comprehensions.
flake8-copyright, # Adds copyright checks to flake8
flake8-deprecated, # Warns about deprecated method calls.
#dlint, # Dlint is a tool for encouraging best coding practices and helping ensure we're writing secure Python code.
## flake8-docstrings, # Extension for flake8 which uses pydocstyle to check docstrings
flake8-eradicate, # Flake8 plugin to find commented out code
flake8-license,
# pandas-vet, # A Flake8 plugin that provides opinionated linting for pandas code
flake8-pytest, # pytest assert checker plugin for flake8
#flake8-variables-names, # flake8 extension that helps to make more readable variables names
flake8-tabs, # Tab (or Spaces) indentation style checker for flake8
pep8-naming, # Check PEP-8 naming conventions, plugin for flake8
]
args: [
"--exclude", "src/python/rsp/scheduling/asp/theory.py"
]
- repo: local
hooks:
# Vulture
# https://github.com/jendrikseipp/vulture
- id: vulture
name: vulture
description: Find dead Python code
entry: vulture
args: [
"--min-confidence", "40",
"--exclude", "src/python/rsp/scheduling/asp/theory.py,src/python/rsp/read_in.py",
"src/python/rsp", "tests"
]
language: system
types: [python]