1+ #
2+ # Tool: Black
3+ #
4+
15[tool .black ]
26# 'extend-exclude' excludes files or directories in addition to the defaults
37extend-exclude = '''
@@ -9,6 +13,11 @@ extend-exclude = '''
913)
1014'''
1115
16+
17+ #
18+ # Tool: Coverage
19+ #
20+
1221[tool .coverage .run ]
1322branch = true
1423omit = [
@@ -22,6 +31,10 @@ exclude_also = [
2231 " if TYPE_CHECKING:" ,
2332]
2433
34+ #
35+ # Tool: Pytest
36+ #
37+
2538[tool .pytest .ini_options ]
2639addopts = " -vvv -rfEs -s --durations=5 --cov=./sentry_sdk --cov-branch --cov-report= --tb=short --junitxml=.junitxml"
2740asyncio_mode = " strict"
@@ -34,6 +47,10 @@ markers = [
3447verbose = true
3548nobeep = true
3649
50+ #
51+ # Tool: Mypy
52+ #
53+
3754[tool .mypy ]
3855allow_redefinition = true
3956check_untyped_defs = true
@@ -43,7 +60,7 @@ disallow_subclassing_any = true
4360disallow_untyped_decorators = true
4461disallow_untyped_defs = true
4562no_implicit_optional = true
46- python_version = " 3.11"
63+ python_version = " 3.11"
4764strict_equality = true
4865strict_optional = true
4966warn_redundant_casts = true
@@ -165,3 +182,31 @@ ignore_missing_imports = true
165182[[tool .mypy .overrides ]]
166183module = " grpc.*"
167184ignore_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+ ]
0 commit comments