28e7817f3ec42a59054a772f80a5782812a02448,src/data/utils.py,,files_under,#Any#,13

Before Change


def files_under(path):
    for f in os.listdir(path):
        item = os.path.join(path, f)
        if os.path.isfile(item):
            yield item
    // return [os.path.join(path, f) for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))]


def basename_without_ext(path_to_file):
    bn = os.path.basename(path_to_file)
    return os.path.splitext(bn)[0]

After Change



def files_under(path: Path):
    for f in path.glob("*"):
        if f.is_file():
            yield f


def basename_without_ext(path_to_file: Path):
    return path_to_file.stem

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: PavlosMelissinos/enet-keras
Commit Name: 28e7817f3ec42a59054a772f80a5782812a02448
Time: 2019-12-17
Author: PavlosMelissinos@users.noreply.github.com
File Name: src/data/utils.py
Class Name:
Method Name: files_under


Project Name: explosion/thinc
Commit Name: 7ee43f4346812c46b8df43c8cdf7a3016958949c
Time: 2020-01-15
Author: ines@ines.io
File Name: setup.py
Class Name:
Method Name: clean


Project Name: stellargraph/stellargraph
Commit Name: 7a9c823fa3422e642e779e3ed23e4dda935ee14f
Time: 2019-12-05
Author: andrew.docherty@data61.csiro.au
File Name: scripts/format_notebooks.py
Class Name:
Method Name: