aa0a96015c1162092ae1d7423984ed2ab9f7078c,brian2/utils/sphinxext/docscrape_sphinx.py,SphinxDocString,_str_member_list,#SphinxDocString#Any#,59
Before Change
param = param.strip()
if self._obj and not hasattr(self._obj, param):
// Fake the attribute docstring
setattr(self._obj, param, DummyClass())
getattr(self._obj, param).__doc__ = "\n".join(desc)
// Fake a __get__ method -- this makes sphinx think this
// is an attribute
getattr(self._obj, param).__get__ = lambda : None
After Change
(hasattr(self._obj, param) and callable(getattr(self._obj, param)))):
// Do not override directly provided docstrings
if not len("".join(desc).strip()):
analyzer = ModuleAnalyzer.for_module(self._obj.__module__)
desc = analyzer.find_attr_docs().get((self._obj.__name__, param), "")
// Only fake a property if we got a docstring
if len("".join(desc).strip()):
setattr(self._obj, param, property(lambda self: None,
doc="\n".join(desc)))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: brian-team/brian2
Commit Name: aa0a96015c1162092ae1d7423984ed2ab9f7078c
Time: 2012-09-24
Author: marcel.stimberg@ens.fr
File Name: brian2/utils/sphinxext/docscrape_sphinx.py
Class Name: SphinxDocString
Method Name: _str_member_list
Project Name: dmlc/gluon-cv
Commit Name: 4999f9795af7a21ca69adf5f72301b79f719498e
Time: 2018-06-05
Author: 8041160+zhanghang1989@users.noreply.github.com
File Name: gluoncv/model_zoo/pspnet.py
Class Name: PSPNet
Method Name: __init__
Project Name: hyperspy/hyperspy
Commit Name: 889e5b729676b7dd8fdc7f75db3189ef85759add
Time: 2020-11-08
Author: eric.prestat@gmail.com
File Name: hyperspy/_components/expression.py
Class Name: Expression
Method Name: compile_function