Skip to content

Commit 283f910

Browse files
Add exclude lines to .coveragerc to account for a) if t.TYPE_CHECKING blocks and b) lines that are only ellipses, as well as some temporary pragma comments in _typing_compat.py. This seems to account for most of the missing coverage with the current configuration, excluding line 447 in validators.py.
1 parent 7fc9af0 commit 283f910

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.coveragerc

+2
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ exclude_lines =
33
.* # Python \d.*
44
.* # nocov: Python \d.*
55
.* # pragma: no cover.*
6+
^\s*(?:el)?if t\.TYPE_CHECKING:$
7+
^ +\.\.\.$
68
fail_under = 100

src/rfc3986/_typing_compat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
__all__ = ("Self",)
55

6-
if sys.version_info >= (3, 11):
6+
if sys.version_info >= (3, 11): # pragma: no cover
77
from typing import Self
88
elif t.TYPE_CHECKING:
99
from typing_extensions import Self
10-
else:
10+
else: # pragma: no cover
1111

1212
class _PlaceholderMeta(type):
1313
# This is meant to make it easier to debug the presence of placeholder

0 commit comments

Comments
 (0)