37177ecd552cc8cc30586a1a041eddcc4b2a9841,skbio/util/_decorator.py,classonlymethod,__get__,#classonlymethod#Any#Any#,347
Before Change
" "%s.%s" instead."
% (cls.__name__, self.__func__.__name__))
evaldict = self.__func__.__globals__.copy()
evaldict["_call_"] = self.__func__
evaldict["_cls_"] = cls
fun = FunctionMakerDropFirstArg.create(
self.__func__, "return _call_(_cls_, %(shortsignature)s)",
evaldict, __wrapped__=self.__func__)
fun.__func__ = self.__func__ // Doctests need the orginal function
return fun
class FunctionMakerDropFirstArg(decorator.FunctionMaker):
def __init__(self, *args, **kwargs):
After Change
raise TypeError("Class-only method called on an instance. Use"
" "%s.%s" instead."
% (cls.__name__, self.__func__.__name__))
return super().__get__(obj, cls)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: biocore/scikit-bio
Commit Name: 37177ecd552cc8cc30586a1a041eddcc4b2a9841
Time: 2016-06-24
Author: ebolyen@gmail.com
File Name: skbio/util/_decorator.py
Class Name: classonlymethod
Method Name: __get__
Project Name: biocore/scikit-bio
Commit Name: 5da3b4a48dcc59e65d3b7c99bd9b4d284bef1ed5
Time: 2016-07-21
Author: ebolyen@gmail.com
File Name: skbio/util/_decorator.py
Class Name: classonlymethod
Method Name: __get__
Project Name: pymc-devs/pymc3
Commit Name: 32eb4d6faa3916d1cfbff69f58c927017beced89
Time: 2013-12-10
Author: jsalvatier@gmail.com
File Name: pymc/distributions/continuous.py
Class Name: Bound
Method Name: __call__
Project Name: biocore/scikit-bio
Commit Name: 37177ecd552cc8cc30586a1a041eddcc4b2a9841
Time: 2016-06-24
Author: ebolyen@gmail.com
File Name: skbio/util/_decorator.py
Class Name: classonlymethod
Method Name: __get__