forked from OxfordIonTrapGroup/entangler-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
73 lines (71 loc) · 2.29 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
repos:
# Basic file type & housekeeping checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: check-json
- id: check-docstring-first
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.6
hooks:
- id: remove-tabs
# # Python formatting hooks
# - repo: https://github.com/psf/black
# rev: 19.3b0
# hooks:
# - id: black
# name: Format Python ('black' formatter)
# # language_version: python3.7
# # VERY opinionated Python formatter, but makes it easy to use/consistent
- repo: https://github.com/myint/docformatter
rev: v1.2
hooks:
- id: docformatter
name: Python docstring formatter
args: ["--wrap-summaries", "88", "--wrap-descriptions", "88"]
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.6.1
hooks:
- id: reorder-python-imports
# Python content/style checks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.4.1
hooks:
- id: python-no-eval
- id: python-no-log-warn
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
args: [--max-line-length=88, "--ignore=E203,W503"]
- repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle
rev: v2.1.1
hooks:
- id: pydocstyle
name: Check docstrings (pydocstyle)
- repo: local
hooks:
# pylint must be local because it needs to import modules
- id: pylint
name: pylint (code content "linter")
# allow code style, refactoring, and TODO issues to pass commit
# allow redefined-outer-name for pytest
# no-member because migen Modules don't have the .comb,.sync, etc attrs
args: ["-d C,R,fixme,redefined-outer-name,no-member"]
entry: python -m pylint.__main__
language: system
types: [python]