ef7e473d04352059c33af7bef48321e5dec7b3da,setup.py,,get_long_description,#,35

Before Change


    if not os.path.isfile(readme_file):
        return ""
    // Try to transform the README from Markdown to reStructuredText.
    try:
        easy_install.main(["-U", "pyandoc==0.0.1"])
        import pandoc
        pandoc.core.PANDOC_PATH = "pandoc"
        doc = pandoc.Document()
        doc.markdown = open(readme_file).read()
        description = doc.rst
    except Exception:
        description = open(readme_file).read()
    return description


setup(

After Change


    // Try to transform the README from Markdown to reStructuredText.
    try:
        from pypandoc import convert
        read_md = convert(readme_file, "rst")
    except ImportError:
        print("warning: pypandoc module not found, could not convert Markdown to RST")
        read_md = open(readme_file, "r").read()
    return read_md
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: EpistasisLab/tpot
Commit Name: ef7e473d04352059c33af7bef48321e5dec7b3da
Time: 2015-11-13
Author: rso@randalolson.com
File Name: setup.py
Class Name:
Method Name: get_long_description


Project Name: home-assistant/home-assistant
Commit Name: 35f0270688d2bd1e31e45ebbc1771f1ff940bff6
Time: 2015-07-16
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/sun.py
Class Name:
Method Name: setup


Project Name: home-assistant/home-assistant
Commit Name: 231656916c293e444bc6c062c8cc96e75b1f4f97
Time: 2016-08-04
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/thermostat/__init__.py
Class Name: ThermostatDevice
Method Name: max_temp


Project Name: home-assistant/home-assistant
Commit Name: 231656916c293e444bc6c062c8cc96e75b1f4f97
Time: 2016-08-04
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/thermostat/__init__.py
Class Name: ThermostatDevice
Method Name: min_temp