From 15270dfaf0a139581807d1f2cd3171291d63d359 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 30 Jul 2020 09:07:35 +0200 Subject: [PATCH] don't count overage for AssertionErrors A common pattern in sans-io is to essentially match on all variants of an enum, and then have a `else: raise AssertionError` in the end. This increases robustness as we spot incomplete coverage instead of silently passing. However, it makes no sense to explicitly test these asserts. --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a800ae1f9..c9c19704f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,8 @@ omit = *contrib*, *tnetstring*, *platform*, *main.py show_missing = True exclude_lines = pragma: no cover - raise NotImplementedError() + raise NotImplementedError + raise AssertionError if typing.TYPE_CHECKING: if TYPE_CHECKING: @overload