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__)

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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: rail-berkeley/softlearning
Commit Name: 6d6f8612a0b12636269e3837c6bb27d2ff94e9d3
Time: 2019-01-10
Author: henryee333@gmail.com
File Name: softlearning/samplers/remote_sampler.py
Class Name: RemoteSampler
Method Name: __getstate__


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__