Skip to content

Commit 662fc75

Browse files
committed
Exclude protocols from coverage
1 parent 5d7d33e commit 662fc75

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ source = [
109109
".tox/pypy*/site-packages",
110110
]
111111

112+
[tool.coverage.report]
113+
exclude_also = [
114+
"class .*\\bProtocol\\):",
115+
]
116+
112117
[tool.ruff]
113118
src = ["src", "tests"]
114119
select = [

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)