Skip to content

Commit c232180

Browse files
authored
Merge pull request #2360 from cclauss/flake8-pyproject
Move flake8 settings into pyproject.toml
2 parents 7190d1d + 7de0a2d commit c232180

File tree

4 files changed

+39
-21
lines changed

4 files changed

+39
-21
lines changed

.flake8

-11
This file was deleted.

pyproject.toml

+16
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ dev = [
114114
"example-shared-isort-profile>=0.1.0",
115115
"flake8>=3.8.4",
116116
"flake8-bugbear>=22.12.12",
117+
"flake8-pyproject>=1.2.3",
117118
"hatch>=1.14.0",
118119
"httpx>=0.13.3",
119120
"hypothesis>=6.10.1",
@@ -141,6 +142,21 @@ dev = [
141142
"vulture>=1.0",
142143
]
143144

145+
[tool.flake8]
146+
max-line-length = 100
147+
# Ignore non PEP 8 compliant rules as suggested by black
148+
# E203: https://github.com/psf/black/blob/3fab5ade71bccf80ae0a5af76729099869adea56/docs/the_black_code_style/current_style.md#slices
149+
extend-ignore = [
150+
"B017",
151+
"E203",
152+
]
153+
exclude = "_vendored"
154+
per-file-ignores = [
155+
"tests/unit/example_crlf_file.py:F401",
156+
"tests/unit/profiles/test_black.py:E501",
157+
"tests/unit/test_regressions.py:E501",
158+
]
159+
144160
[tool.mypy]
145161
python_version = 3.9
146162
strict = true

scripts/lint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ uv run mypy -p isort -p tests
66
uv run black --target-version py39 --check .
77
uv run isort --profile hug --check --diff isort/ tests/
88
uv run isort --profile hug --check --diff example_*/
9-
uv run flake8 isort/ tests/
9+
uv run --with=Flake8-pyproject flake8 isort/ tests/
1010
# 51457: https://github.com/tiangolo/typer/discussions/674
1111
# 72715: https://github.com/timothycrosley/portray/issues/95
1212
uv run safety check -i 72715 -i 51457 -i 59587

uv.lock

+22-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)