Skip to content

Commit 951123c

Browse files
committed
[IMP] use pre-commit to ensure code quality
Part of odoo/upgrade#1005 Signed-off-by: Christophe Simonis <[email protected]>
1 parent 603e531 commit 951123c

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

.pre-commit-config.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 19.10b0
4+
hooks:
5+
- id: black
6+
- repo: https://gitlab.com/pycqa/flake8
7+
rev: 3.7.9
8+
hooks:
9+
- id: flake8
10+
additional_dependencies:
11+
- flake8-bugbear
12+
- flake8-logging-format
13+
- flake8-implicit-str-concat
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v2.5.0
16+
hooks:
17+
- id: check-yaml
18+
- id: end-of-file-fixer
19+
- id: trailing-whitespace
20+
- id: check-symlinks
21+
- id: debug-statements

requirements-dev.txt

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
# Code Formatting
2-
black
3-
4-
# Code Quality
5-
flake8-bugbear
6-
flake8-logging-format
1+
pre-commit

setup.cfg

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore += E241,E265,E302,W503,E501
3-
select += B,B9
4-
max-line-length = 120
2+
select = C,E,F,W,B,B9,ISC
3+
ignore = E501,E301,E302,E265,E241,E731,W503
54
enable-extensions = G
5+
max-line-length = 120

0 commit comments

Comments
 (0)