Skip to content

Commit 4ec621b

Browse files
committed
Moved flake8 config into pyproject.toml
1 parent 8d5cb75 commit 4ec621b

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

.flake8

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

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,31 @@ ignore_missing_imports = true
182182
[[tool.mypy.overrides]]
183183
module = "grpc.*"
184184
ignore_missing_imports = true
185+
186+
#
187+
# Tool: Flake8
188+
#
189+
190+
[tool.flake8]
191+
extend-ignore = [
192+
# Handled by black (Whitespace before ':' -- handled by black)
193+
"E203",
194+
# Handled by black (Line too long)
195+
"E501",
196+
# Sometimes not possible due to execution order (Module level import is not at top of file)
197+
"E402",
198+
# I don't care (Do not assign a lambda expression, use a def)
199+
"E731",
200+
# does not apply to Python 2 (redundant exception types by flake8-bugbear)
201+
"B014",
202+
# I don't care (Lowercase imported as non-lowercase by pep8-naming)
203+
"N812",
204+
# is a worse version of and conflicts with B902 (first argument of a classmethod should be named cls)
205+
"N804",
206+
]
207+
extend-exclude = ["checkouts", "lol*"]
208+
exclude = [
209+
# gRCP generated files
210+
"grpc_test_service_pb2.py",
211+
"grpc_test_service_pb2_grpc.py",
212+
]

requirements-linting.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
mypy
22
black
3-
flake8==5.0.4 # flake8 depends on pyflakes>=3.0.0 and this dropped support for Python 2 "# type:" comments
3+
flake8==5.0.4
4+
flake8-pyproject # Flake8 plugin to support configuration in pyproject.toml
5+
flake8-bugbear # Flake8 plugin
6+
pep8-naming # Flake8 plugin
47
types-certifi
58
types-protobuf
69
types-gevent
@@ -11,8 +14,6 @@ types-webob
1114
opentelemetry-distro
1215
pymongo # There is no separate types module.
1316
loguru # There is no separate types module.
14-
flake8-bugbear
15-
pep8-naming
1617
pre-commit # local linting
1718
httpcore
1819
launchdarkly-server-sdk

0 commit comments

Comments
 (0)