0c11ba0bf8967867433a2044af19440baf3b36df,setup.py,,read_to_rst,#Any#,48
Before Change
try:
import pypandoc
rstname = "{}.{}".format(os.path.splitext(fname)[0], "rst")
return pypandoc.convert(read(fname), "rst", format="md")
//return read(rstname)
except ImportError:
return read(fname)
After Change
import pypandoc
rstname = "{}.{}".format(os.path.splitext(fname)[0], "rst")
rststr = pypandoc.convert(read(fname), "rst", format="md")
with open(rstname, "w") as f:
f.write(rststr)
return rststr
//return read(rstname)
except ImportError:
return read(fname)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: SheffieldML/GPy
Commit Name: 0c11ba0bf8967867433a2044af19440baf3b36df
Time: 2015-11-07
Author: ibinbei@gmail.com
File Name: setup.py
Class Name:
Method Name: read_to_rst
Project Name: prody/ProDy
Commit Name: 71b5f551e38daeb03aafb32585e259c1fe293c20
Time: 2012-11-30
Author: lordnapi@gmail.com
File Name: lib/prody/utilities/pathtools.py
Class Name:
Method Name: gunzip
Project Name: pytorch/text
Commit Name: 37452ca74a6022d6b67ba0ba9af2b1e406de7578
Time: 2018-04-27
Author: zhshihang@gmail.com
File Name: torchtext/utils.py
Class Name:
Method Name: download_from_url
Project Name: SheffieldML/GPy
Commit Name: 9758001d02e2a96bd6da9db74cde358b2593c455
Time: 2015-09-10
Author: ibinbei@gmail.com
File Name: setup.py
Class Name:
Method Name: read_to_rst