Skip to content

Commit

Permalink
Add exclude lines to .coveragerc to account for a) `if t.TYPE_CHECKIN…
Browse files Browse the repository at this point in the history
…G` 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.
  • Loading branch information
Sachaa-Thanasius committed Jul 3, 2024
1 parent 7fc9af0 commit 283f910
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ exclude_lines =
.* # Python \d.*
.* # nocov: Python \d.*
.* # pragma: no cover.*
^\s*(?:el)?if t\.TYPE_CHECKING:$
^ +\.\.\.$
fail_under = 100
4 changes: 2 additions & 2 deletions src/rfc3986/_typing_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

__all__ = ("Self",)

if sys.version_info >= (3, 11):
if sys.version_info >= (3, 11): # pragma: no cover
from typing import Self
elif t.TYPE_CHECKING:
from typing_extensions import Self
else:
else: # pragma: no cover

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

0 comments on commit 283f910

Please sign in to comment.