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 = [
@@ -21,3 +30,183 @@ omit = [
2130exclude_also = [
2231 " if TYPE_CHECKING:" ,
2332]
33+
34+ #
35+ # Tool: Pytest
36+ #
37+
38+ [tool .pytest .ini_options ]
39+ addopts = " -vvv -rfEs -s --durations=5 --cov=./sentry_sdk --cov-branch --cov-report= --tb=short --junitxml=.junitxml"
40+ asyncio_mode = " strict"
41+ asyncio_default_fixture_loop_scope = " function"
42+ markers = [
43+ " tests_internal_exceptions: Handle internal exceptions just as the SDK does, to test it. (Otherwise internal exceptions are recorded and reraised.)" ,
44+ ]
45+
46+ [tool .pytest-watch ]
47+ verbose = true
48+ nobeep = true
49+
50+ #
51+ # Tool: Mypy
52+ #
53+
54+ [tool .mypy ]
55+ allow_redefinition = true
56+ check_untyped_defs = true
57+ disallow_any_generics = true
58+ disallow_incomplete_defs = true
59+ disallow_subclassing_any = true
60+ disallow_untyped_decorators = true
61+ disallow_untyped_defs = true
62+ no_implicit_optional = true
63+ python_version = " 3.11"
64+ strict_equality = true
65+ strict_optional = true
66+ warn_redundant_casts = true
67+ warn_unused_configs = true
68+ warn_unused_ignores = true
69+
70+ # Relaxations for code written before mypy was introduced
71+ # Do not use wildcards in module paths, otherwise added modules will
72+ # automatically have the same set of relaxed rules as the rest
73+ [[tool .mypy .overrides ]]
74+ module = " cohere.*"
75+ ignore_missing_imports = true
76+
77+ [[tool .mypy .overrides ]]
78+ module = " django.*"
79+ ignore_missing_imports = true
80+
81+ [[tool .mypy .overrides ]]
82+ module = " pyramid.*"
83+ ignore_missing_imports = true
84+
85+ [[tool .mypy .overrides ]]
86+ module = " psycopg2.*"
87+ ignore_missing_imports = true
88+
89+ [[tool .mypy .overrides ]]
90+ module = " pytest.*"
91+ ignore_missing_imports = true
92+
93+ [[tool .mypy .overrides ]]
94+ module = " aiohttp.*"
95+ ignore_missing_imports = true
96+
97+ [[tool .mypy .overrides ]]
98+ module = " anthropic.*"
99+ ignore_missing_imports = true
100+
101+ [[tool .mypy .overrides ]]
102+ module = " sanic.*"
103+ ignore_missing_imports = true
104+
105+ [[tool .mypy .overrides ]]
106+ module = " tornado.*"
107+ ignore_missing_imports = true
108+
109+ [[tool .mypy .overrides ]]
110+ module = " fakeredis.*"
111+ ignore_missing_imports = true
112+
113+ [[tool .mypy .overrides ]]
114+ module = " rq.*"
115+ ignore_missing_imports = true
116+
117+ [[tool .mypy .overrides ]]
118+ module = " pyspark.*"
119+ ignore_missing_imports = true
120+
121+ [[tool .mypy .overrides ]]
122+ module = " asgiref.*"
123+ ignore_missing_imports = true
124+
125+ [[tool .mypy .overrides ]]
126+ module = " langchain_core.*"
127+ ignore_missing_imports = true
128+
129+ [[tool .mypy .overrides ]]
130+ module = " executing.*"
131+ ignore_missing_imports = true
132+
133+ [[tool .mypy .overrides ]]
134+ module = " asttokens.*"
135+ ignore_missing_imports = true
136+
137+ [[tool .mypy .overrides ]]
138+ module = " pure_eval.*"
139+ ignore_missing_imports = true
140+
141+ [[tool .mypy .overrides ]]
142+ module = " blinker.*"
143+ ignore_missing_imports = true
144+
145+ [[tool .mypy .overrides ]]
146+ module = " sentry_sdk._queue"
147+ ignore_missing_imports = true
148+ disallow_untyped_defs = false
149+
150+ [[tool .mypy .overrides ]]
151+ module = " sentry_sdk._lru_cache"
152+ disallow_untyped_defs = false
153+
154+ [[tool .mypy .overrides ]]
155+ module = " celery.app.trace"
156+ ignore_missing_imports = true
157+
158+ [[tool .mypy .overrides ]]
159+ module = " flask.signals"
160+ ignore_missing_imports = true
161+
162+ [[tool .mypy .overrides ]]
163+ module = " huey.*"
164+ ignore_missing_imports = true
165+
166+ [[tool .mypy .overrides ]]
167+ module = " openai.*"
168+ ignore_missing_imports = true
169+
170+ [[tool .mypy .overrides ]]
171+ module = " openfeature.*"
172+ ignore_missing_imports = true
173+
174+ [[tool .mypy .overrides ]]
175+ module = " huggingface_hub.*"
176+ ignore_missing_imports = true
177+
178+ [[tool .mypy .overrides ]]
179+ module = " arq.*"
180+ ignore_missing_imports = true
181+
182+ [[tool .mypy .overrides ]]
183+ module = " grpc.*"
184+ 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+ ]
0 commit comments