From 6905952a33e9d5c503f2fa3dcdc93be0fca49b1b Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Tue, 21 Jan 2025 10:23:05 -0500 Subject: [PATCH] chore[tool]: update coverage exclusion rules improve coverage by updating coverage exclusion rules to exclude statements/branches we don't expect to hit at runtime (like panics or type checking) --- setup.cfg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.cfg b/setup.cfg index 4cce85034d..0c175971a6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,3 +45,11 @@ omit = vyper/version.py # allow `coverage combine` to combine reports from heterogeneous OSes. # (mainly important for consolidating coverage reports in the CI). relative_files = True + +[coverage:report] +# see https://coverage.readthedocs.io/en/latest/excluding.html#advanced-exclusion +exclude_also = + if TYPE_CHECKING: + def __repr__ + raise CompilerPanic + raise TypeCheckFailure