Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move flake8 settings into pyproject.toml #2360

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .flake8

This file was deleted.

16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ dev = [
"example-shared-isort-profile>=0.1.0",
"flake8>=3.8.4",
"flake8-bugbear>=22.12.12",
"flake8-pyproject>=1.2.3",
"hatch>=1.14.0",
"httpx>=0.13.3",
"hypothesis>=6.10.1",
Expand Down Expand Up @@ -141,6 +142,21 @@ dev = [
"vulture>=1.0",
]

[tool.flake8]
max-line-length = 100
# Ignore non PEP 8 compliant rules as suggested by black
# E203: https://github.com/psf/black/blob/3fab5ade71bccf80ae0a5af76729099869adea56/docs/the_black_code_style/current_style.md#slices
extend-ignore = [
"B017",
"E203",
]
exclude = "_vendored"
per-file-ignores = [
"tests/unit/example_crlf_file.py:F401",
"tests/unit/profiles/test_black.py:E501",
"tests/unit/test_regressions.py:E501",
]

[tool.mypy]
python_version = 3.9
strict = true
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ uv run mypy -p isort -p tests
uv run black --target-version py39 --check .
uv run isort --profile hug --check --diff isort/ tests/
uv run isort --profile hug --check --diff example_*/
uv run flake8 isort/ tests/
uv run --with=Flake8-pyproject flake8 isort/ tests/
# 51457: https://github.com/tiangolo/typer/discussions/674
# 72715: https://github.com/timothycrosley/portray/issues/95
uv run safety check -i 72715 -i 51457 -i 59587
Expand Down
31 changes: 22 additions & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.