Skip to content

Commit 72dbdc9

Browse files
committed
[IMP] update dotfiles [ci skip]
1 parent 71c7505 commit 72dbdc9

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
2-
_commit: v1.1.1
2+
_commit: v1.1.4
33
_src_path: gh:oca/oca-addons-repo-template
44
dependency_installation_mode: PIP
55
generate_requirements_txt: true

.flake8

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
max-line-length = 80
2+
max-line-length = 88
33
max-complexity = 16
44
# B = bugbear
55
# B9 = bugbear opinionated (incl line length)
@@ -8,3 +8,5 @@ select = C,E,F,W,B,B9
88
# E501: flake8 line length (covered by bugbear B950)
99
# W503: line break before binary operator (black behaviour)
1010
ignore = E203,E501,W503
11+
per-file-ignores=
12+
__init__.py:F401

.isort.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ known_odoo=odoo
1010
known_odoo_addons=odoo.addons
1111
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
1212
default_section=THIRDPARTY
13+
ensure_newline_before_comments = True

.pre-commit-config.yaml

+12-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exclude: |
55
# Files and folders generated by bots, to avoid loops
66
^setup/|/static/description/index\.html$|
77
# We don't want to mess with tool-generated files
8-
.svg$|
8+
.svg$|/tests/([^/]+/)?cassettes/|
99
# Maybe reactivate this when all README files include prettier ignore tags?
1010
^README\.md$|
1111
# Library files can have extraneous formatting (even minimized)
@@ -38,7 +38,13 @@ repos:
3838
rev: v1.4
3939
hooks:
4040
- id: autoflake
41-
args: ["-i", "--ignore-init-module-imports"]
41+
args:
42+
- --expand-star-imports
43+
- --ignore-init-module-imports
44+
- --in-place
45+
- --remove-all-unused-imports
46+
- --remove-duplicate-keys
47+
- --remove-unused-variables
4248
- repo: https://github.com/psf/black
4349
rev: 20.8b1
4450
hooks:
@@ -47,12 +53,13 @@ repos:
4753
rev: v2.1.2
4854
hooks:
4955
- id: prettier
50-
name: prettier + plugin-xml
56+
name: prettier (with plugin-xml)
5157
additional_dependencies:
5258
- "prettier@2.1.2"
5359
- "@prettier/plugin-xml@0.12.0"
5460
args:
5561
- --plugin=@prettier/plugin-xml
62+
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
5663
- repo: https://github.com/pre-commit/mirrors-eslint
5764
rev: v7.8.1
5865
hooks:
@@ -87,6 +94,7 @@ repos:
8794
rev: v2.7.2
8895
hooks:
8996
- id: pyupgrade
97+
args: ["--keep-percent-format"]
9098
- repo: https://github.com/PyCQA/isort
9199
rev: 5.5.1
92100
hooks:
@@ -109,13 +117,7 @@ repos:
109117
rev: 3.8.3
110118
hooks:
111119
- id: flake8
112-
name: flake8 except __init__.py
113-
exclude: /__init__\.py$
114-
additional_dependencies: ["flake8-bugbear==20.1.4"]
115-
- id: flake8
116-
name: flake8 only __init__.py
117-
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py
118-
files: /__init__\.py$
120+
name: flake8
119121
additional_dependencies: ["flake8-bugbear==20.1.4"]
120122
- repo: https://github.com/PyCQA/pylint
121123
rev: pylint-2.5.3

0 commit comments

Comments
 (0)