Skip to content

Commit 673f8a6

Browse files
committed
Exclude protocols from coverage
1 parent 0e79dbd commit 673f8a6

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
@@ -109,6 +109,7 @@ source_pkgs = ["cattrs", "tests"]
109109
exclude_also = [
110110
"@overload",
111111
"if TYPE_CHECKING:",
112+
"class .*\\bProtocol\\):",
112113
]
113114

114115
[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)