Skip to content

Commit

Permalink
Keep abstractmethod decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
betatim committed Sep 6, 2016
1 parent f4419a9 commit 2ba3478
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sklearn/metrics/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Arnaud Joly <arnaud.v.joly@gmail.com>
# License: Simplified BSD

from abc import ABCMeta
from abc import ABCMeta, abstractmethod
import warnings

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

@abstractmethod
def __call__(self, estimator, X, y, sample_weight=None):
if self._deprecation_msg is not None:
warnings.warn(self._deprecation_msg,
Expand Down

0 comments on commit 2ba3478

Please sign in to comment.