Skip to content

Commit 8e848ab

Browse files
committed
Update pre-commit-config and tweak settings
- Add isort pre-commit hook. - Fix the case of flake8 pre-commit hook url. - Ignore W503 flake8 rule to enforce W504 instead. - Standardize setuptools-scm formatting matching setup-cfg-fmt enforcement
1 parent 55dc362 commit 8e848ab

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
hooks:
77
- id: black
88

9-
- repo: https://gitlab.com/pycqa/flake8
9+
- repo: https://github.com/PyCQA/flake8
1010
rev: 3.9.1
1111
hooks:
1212
- id: flake8
@@ -30,3 +30,9 @@ repos:
3030
- id: end-of-file-fixer
3131
- id: requirements-txt-fixer
3232
- id: trailing-whitespace
33+
34+
- repo: https://github.com/PyCQA/isort
35+
rev: 5.10.1
36+
hooks:
37+
- id: isort
38+
name: isort (python)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
requires = [
33
"setuptools >= 44.1.1",
4-
"setuptools_scm[toml] >= 4, <6",
4+
"setuptools-scm[toml] >= 4, <6",
55
"wheel >= 0.36",
66
]
77
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
3838
include_package_data = True
3939
setup_requires =
4040
setuptools
41-
setuptools_scm[toml]>=4,<6
41+
setuptools-scm[toml]>=4,<6
4242
wheel
4343

4444
[options.packages.find]
@@ -67,7 +67,8 @@ select = B, C, E, F, N, W, B9
6767
extend-ignore =
6868
E203,
6969
E501,
70-
E722
70+
E722,
71+
W503,
7172
max-line-length = 80
7273
exclude =
7374
*.egg-info

0 commit comments

Comments
 (0)