Skip to content

Commit 332df50

Browse files
committed
Move flake8 configuration into pyproject.toml
Thanks, flake8-pyproject!
1 parent 19e1e6f commit 332df50

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ repos:
1010
rev: 4.0.1
1111
hooks:
1212
- id: flake8
13-
additional_dependencies: [flake8-typing-imports==1.7.0]
13+
additional_dependencies:
14+
- "flake8-typing-imports"
15+
- "Flake8-pyproject"
1416
# Next, sort imports
1517
- repo: https://github.com/PyCQA/isort
1618
rev: 5.10.1

dev-environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies:
3232
- black
3333
- build
3434
- flake8
35+
- flake8-typing-imports
3536
- isort
3637
- pytest
3738
- pytest-cov
@@ -40,5 +41,6 @@ dependencies:
4041
- pip
4142
- pip:
4243
- git+https://github.com/ninia/jep.git@cfca63f8b3398daa6d2685428660dc4b2bfab67d
44+
- flake8-pyproject
4345
- validate-pyproject[all]
4446
- -e .

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ dev = [
4444
"black",
4545
"build",
4646
"flake8",
47+
"flake8-pyproject",
48+
"flake8-typing-imports",
4749
"isort",
4850
"jep",
4951
"pytest",
@@ -69,5 +71,13 @@ include-package-data = false
6971
where = ["src"]
7072
namespaces = false
7173

74+
# Thanks to Flake8-pyproject, we can configure flake8 here!
75+
[tool.flake8]
76+
exclude = ["bin", "build", "dist"]
77+
extend-ignore = ["E203"]
78+
# See https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
79+
max-line-length = 88
80+
min_python_version = "3.7"
81+
7282
[tool.isort]
7383
profile = "black"

setup.cfg

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)