Skip to content

Commit

Permalink
Merge pull request #248 from bgilbert/flake8
Browse files Browse the repository at this point in the history
flake8: move config to `pyproject.toml` with Flake8-pyproject
  • Loading branch information
bgilbert authored Nov 21, 2023
2 parents 2f9f445 + 06f2ce0 commit 7ed0486
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ repos:
hooks:
- id: flake8
name: Lint python code with flake8
additional_dependencies: [flake8-bugbear]
additional_dependencies: [flake8-bugbear, Flake8-pyproject]

- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.0
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ version = {attr = "openslide._version.__version__"}
skip-string-normalization = true
target-version = ["py38", "py39", "py310", "py311", "py312"]

# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
# also ignore:
# - E741 ambiguous variable name
# requires Flake8-pyproject
[tool.flake8]
max-line-length = 88
extend-ignore = ["E203", "E741"]

[tool.isort]
profile = "black"
force_sort_within_sections = true
Expand Down

0 comments on commit 7ed0486

Please sign in to comment.