Tell coveragepy to ignore type checking code and `...`
This is so we can get a more accurate picture of coverage.
For more info see:
@@ -16,6 +16,12 @@ exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
+ # TYPE_CHECKING guarded code only affects type checkers.
+ ^ +if (False|TYPE_CHECKING):
+ # constant used in protocols and abstract methods, does not run anything
+ # and has no side effects.
+ ^ +\.\.\.$
+
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
