Skip to content

Commit cfc8930

Browse files
Copilotvfdev-5
andcommitted
Add explicit type annotation for self.weights attribute
Co-authored-by: vfdev-5 <[email protected]>
1 parent b897611 commit cfc8930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ignite/metrics/cohen_kappa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(
6969
raise ValueError("Kappa Weighting type must be None or linear or quadratic.")
7070

7171
# initalize weights
72-
self.weights = weights
72+
self.weights: Literal["linear", "quadratic"] | None = weights
7373

7474
super(CohenKappa, self).__init__(
7575
self._cohen_kappa_score,

0 commit comments

Comments
 (0)