Skip to content

Commit 19b1024

Browse files
committed
Update default linting configs
1 parent 6592b17 commit 19b1024

File tree

4 files changed

+32
-43
lines changed

4 files changed

+32
-43
lines changed

.flake8

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
[flake8]
22
max-line-length = 88
3-
ignore =
4-
E203
5-
E501
6-
F401
7-
F403
8-
F405
9-
W503
10-
W605
3+
extend-ignore =
4+
E203 # "Whitespace before ':'" - not PEP-8 compliant
5+
E501 # "Line too long (82 >= 79 characters)"
6+
per-file-ignores =
7+
__init__.py:F401

.pre-commit-config.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,14 @@ repos:
77
- id: trailing-whitespace
88
args: [--markdown-linebreak-ext=md]
99
- id: end-of-file-fixer
10+
- id: check-json
1011
- id: check-toml
1112
- id: check-yaml
1213
- id: requirements-txt-fixer
1314
- repo: https://github.com/pre-commit/mirrors-prettier
1415
rev: v2.5.1
1516
hooks:
1617
- id: prettier
17-
- repo: https://github.com/PyCQA/isort
18-
rev: 5.10.1
19-
hooks:
20-
- id: isort
21-
additional_dependencies:
22-
- toml
2318
- repo: https://github.com/asottile/setup-cfg-fmt
2419
rev: v1.20.0
2520
hooks:
@@ -29,17 +24,31 @@ repos:
2924
hooks:
3025
- id: pyupgrade
3126
args: [--py37-plus]
27+
## <<< darker ##
28+
## - repo: https://github.com/akaihola/darker
29+
## rev: 1.4.0
30+
## hooks:
31+
## - id: darker
32+
## args: ["--isort"] # TODO: Move to pyproject.toml
33+
## additional_dependencies:
34+
## - isort
35+
## === ##
36+
- repo: https://github.com/PyCQA/isort
37+
rev: 5.10.1
38+
hooks:
39+
- id: isort
3240
- repo: https://github.com/psf/black
3341
rev: 22.1.0
3442
hooks:
35-
- id: black
43+
- id: black # black-jupyter
44+
## >>> black and isort ##
3645
- repo: https://github.com/PyCQA/bandit
3746
rev: 1.7.2
3847
hooks:
3948
- id: bandit
4049
args: [--recursive, --quiet]
41-
- repo: https://github.com/PyCQA/flake8
42-
rev: 4.0.1
50+
- repo: https://gitlab.com/PyCQA/flake8
51+
rev: 3.9.2
4352
hooks:
4453
- id: flake8 # E***, W***, F***
4554
additional_dependencies:

.prettierrc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
proseWrap: always
21
printWidth: 88

pyproject.toml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
11
[build-system]
2-
requires = ["setuptools>=46.4", "wheel", "setuptools_scm[toml]>=4.1"]
2+
requires = [
3+
"setuptools>=45",
4+
"setuptools_scm[toml]>=6.2",
5+
"wheel",
6+
]
37
build-backend = "setuptools.build_meta"
48

9+
[tool.setuptools_scm]
10+
511
[tool.black]
6-
line-length = 88
7-
target-version = ["py36", "py37", "py38"]
8-
include = '\.pyi?$'
9-
exclude = '''
10-
/(
11-
\.eggs
12-
| \.git
13-
| \.hg
14-
| \.mypy_cache
15-
| \.tox
16-
| \.venv
17-
| _build
18-
| buck-out
19-
| build
20-
| dist
21-
)/
22-
'''
12+
target-version = ["py38", "py39", "py310"]
2313

2414
[tool.isort]
25-
multi_line_output = 3
26-
include_trailing_comma = true
27-
force_grid_wrap = 0
28-
use_parentheses = true
29-
line_length = 88
30-
31-
[tool.setuptools_scm]
15+
profile = "black"

0 commit comments

Comments
 (0)