Skip to content

Commit 7ed0486

Browse files
authored
Merge pull request #248 from bgilbert/flake8
flake8: move config to `pyproject.toml` with Flake8-pyproject
2 parents 2f9f445 + 06f2ce0 commit 7ed0486

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.flake8

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

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ repos:
5050
hooks:
5151
- id: flake8
5252
name: Lint python code with flake8
53-
additional_dependencies: [flake8-bugbear]
53+
additional_dependencies: [flake8-bugbear, Flake8-pyproject]
5454

5555
- repo: https://github.com/rstcheck/rstcheck
5656
rev: v6.2.0

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ version = {attr = "openslide._version.__version__"}
4444
skip-string-normalization = true
4545
target-version = ["py38", "py39", "py310", "py311", "py312"]
4646

47+
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
48+
# also ignore:
49+
# - E741 ambiguous variable name
50+
# requires Flake8-pyproject
51+
[tool.flake8]
52+
max-line-length = 88
53+
extend-ignore = ["E203", "E741"]
54+
4755
[tool.isort]
4856
profile = "black"
4957
force_sort_within_sections = true

0 commit comments

Comments
 (0)