Skip to content

Commit 0f9bb26

Browse files
committed
move coveragerc to pyproject
1 parent abc8708 commit 0f9bb26

2 files changed

Lines changed: 39 additions & 40 deletions

File tree

.coveragerc

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

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,42 @@ dev = [
166166
"starlette-admin >=0.14",
167167
"uvicorn >=0.34.0",
168168
]
169+
170+
171+
[tool.coverage.run]
172+
source = "reflex"
173+
branch = true
174+
omit = [
175+
"*/pyi_generator.py",
176+
"reflex/__main__.py",
177+
"reflex/app_module_for_backend.py",
178+
"reflex/components/chakra/*",
179+
"reflex/experimental/*",
180+
]
181+
182+
[tool.coverage.report]
183+
show_missing = true
184+
# TODO bump back to 79
185+
fail_under = 70
186+
precision = 2
187+
ignore_errors = true
188+
189+
exclude_also = [
190+
"def __repr__",
191+
# Don't complain about missing debug-only code:
192+
"if self.debug",
193+
# Don't complain if tests don't hit defensive assertion code:
194+
"raise AssertionError",
195+
"raise NotImplementedError",
196+
# Regexes for lines to exclude from consideration
197+
"if 0:",
198+
# Don't complain if non-runnable code isn't run:
199+
"if __name__ == .__main__.:",
200+
# Don't complain about abstract methods, they aren't run:
201+
"@(abc.)?abstractmethod",
202+
# Don't complain about overloaded methods:
203+
"@overload",
204+
]
205+
206+
[tool.coverage.html]
207+
directory = "coverage_html_report"

0 commit comments

Comments
 (0)