Skip to content

Commit 2ba3478

Browse files
committed
Keep abstractmethod decorator
1 parent f4419a9 commit 2ba3478

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/metrics/scorer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Arnaud Joly <arnaud.v.joly@gmail.com>
1919
# License: Simplified BSD
2020

21-
from abc import ABCMeta
21+
from abc import ABCMeta, abstractmethod
2222
import warnings
2323

2424
import numpy as np
@@ -39,9 +39,10 @@ def __init__(self, score_func, sign, kwargs):
3939
self._score_func = score_func
4040
self._sign = sign
4141
# XXX After removing the deprecated scorers (v0.20) remove the
42-
# XXX deprecation_msg property again and make __call__ abstract again
42+
# XXX deprecation_msg property again and remove __call__'s body again
4343
self._deprecation_msg = None
4444

45+
@abstractmethod
4546
def __call__(self, estimator, X, y, sample_weight=None):
4647
if self._deprecation_msg is not None:
4748
warnings.warn(self._deprecation_msg,

0 commit comments

Comments
 (0)