Skip to content

Commit c9b3af7

Browse files
authored
Move flake8 config to pyproject.toml and remove setup.cfg (#9957)
1 parent 65066b3 commit c9b3af7

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ repos:
1717
hooks:
1818
- id: flake8
1919
additional_dependencies:
20+
- flake8-pyproject
2021
- flake8-tidy-imports
2122
- flake8-bugbear
2223
- repo: https://github.com/adamchainz/blacken-docs

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ extra_standard_library = [ "types" ]
9898
known_third_party = [ "pytest", "_pytest", "django", "uritemplate" ]
9999
known_first_party = [ "rest_framework", "tests" ]
100100

101+
[tool.flake8]
102+
extend-ignore = [ "E501", "W503", "W504", "B" ]
103+
extend-select = [ "B006" ]
104+
banned-modules = "json = use from rest_framework.utils import json!"
105+
101106
[tool.codespell]
102107
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
103108
skip = "*/kickstarter-announcement.md,*.js,*.map,*.po,*.css,locale"

setup.cfg

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

0 commit comments

Comments
 (0)