a6307a080b4edd2050dcd0a6fb0b753efbc17e12,setup.py,,clean,#Any#,15

Before Change


    for src in ext.sources:
        if src.endswith(".c") or src.endswith("cpp"):
            so = src.rsplit(".", 1)[0] + ".so"
            html = src.rsplit(".", 1)[0] + ".html"
            if os.path.exists(so):
                os.unlink(so)
            if os.path.exists(html):

After Change


def clean(path):
    for name in MOD_NAMES:
        name = name.replace(".", "/")
        for ext in [".so", ".html", ".cpp", ".c"]:
            file_path = os.path.join(path, name + ext)
            if os.path.exists(file_path):
                os.unlink(file_path)


@contextlib.contextmanager
def chdir(new_dir):
    old_dir = os.getcwd()
    try:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: explosion/thinc
Commit Name: a6307a080b4edd2050dcd0a6fb0b753efbc17e12
Time: 2015-12-22
Author: pete@dexterslab.de
File Name: setup.py
Class Name:
Method Name: clean


Project Name: apache/incubator-tvm
Commit Name: 6770d28a844597e064b2e0902a36207ff877857d
Time: 2020-09-03
Author: kevinthesunwy@gmail.com
File Name: python/tvm/relay/frontend/tensorflow.py
Class Name: GraphProto
Method Name: _get_relay_func


Project Name: vatlab/SoS
Commit Name: 3239b81335c6a63e209ee9419f4efeea167e40bc
Time: 2019-08-05
Author: ben.bog@gmail.com
File Name: src/sos/workers.py
Class Name: WorkerManager
Method Name: __init__