Skip to content

Commit b7d769f

Browse files
committed
Exclude protocols from coverage
1 parent 1f51c21 commit b7d769f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ source = [
115115
[tool.coverage.report]
116116
exclude_also = [
117117
"@overload",
118+
"class .*\\bProtocol\\):",
118119
]
119120

120121
[tool.ruff]

src/cattrs/v/_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
T = TypeVar("T")
66

77

8-
class Comparable(Protocol):
8+
class Comparable(Protocol[T]):
99
def __lt__(self: T, other: T) -> bool:
1010
...
1111

12-
def __le__(self: T, other: T) -> bool:
12+
def __eq__(self: T, other: T) -> bool:
1313
...
1414

1515

0 commit comments

Comments
 (0)