From a9afb77456c4e658c25cb5f76abe611d1777cd8e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 5 Jul 2015 11:07:11 -0400 Subject: Change how plugins are initialized. No more Plugin. Now coverage_init. --- coverage/misc.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'coverage/misc.py') diff --git a/coverage/misc.py b/coverage/misc.py index 0dad0559..21b7333c 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -158,29 +158,6 @@ class Hasher(object): return self.md5.hexdigest() -def overrides(obj, method_name, base_class): - """Does `obj` override the `method_name` it got from `base_class`? - - Determine if `obj` implements the method called `method_name`, which it - inherited from `base_class`. - - Returns a boolean. - - """ - klass = obj.__class__ - klass_func = getattr(klass, method_name) - base_func = getattr(base_class, method_name) - - # Python 2/3 compatibility: Python 2 returns an instancemethod object, the - # function is the .im_func attribute. Python 3 returns a plain function - # object already. - if env.PY2: - klass_func = klass_func.im_func - base_func = base_func.im_func - - return klass_func is not base_func - - # TODO: abc? def _needs_to_implement(that, func_name): """Helper to raise NotImplementedError in interface stubs.""" -- cgit v1.2.1