5a29571bdeb6deaffa8ed1e7b404566bc7b62505,niftynet/utilities/filename_matching.py,KeywordsMatching,from_tuple,#Any#Any#,23

Before Change


        """
        path, contain, not_contain = [], [], []
        for (name, value) in input_tuple:
            if not isinstance(value, string_types):
                continue
            if len(value) <= 1 or value == """":
                continue
            if name == "path_to_search":
                value = value.split(",")
                for path_i in value:
                    path_i = os.path.abspath(path_i.strip())
                    if os.path.exists(path_i):
                        path.append(path_i)
                    else:
                        raise ValueError("data input folder {} not found, did"
                                         " you maybe forget to download data?"
                                         .format(path_i))
            elif name == "filename_contains":
                value = value.split(",")
                for val in value:
                    contain.append(val.strip())
            elif name == "filename_not_contains":
                value = value.split(",")
                for val in value:
                    not_contain.append(val.strip())
        path = tuple(set(path))
        contain = tuple(set(contain))
        not_contain = tuple(set(not_contain))
        new_matcher = cls(path, contain, not_contain)

After Change


        :param input_tuple:
        :return:
        """
        path, contain, not_contain = [], (), ()
        for (name, value) in input_tuple:
            if not value:
                continue
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NifTK/NiftyNet
Commit Name: 5a29571bdeb6deaffa8ed1e7b404566bc7b62505
Time: 2017-08-19
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/filename_matching.py
Class Name: KeywordsMatching
Method Name: from_tuple


Project Name: streamlit/streamlit
Commit Name: 536c65f1fe2e1dc5fb64e278fd95d23f968a2599
Time: 2018-11-23
Author: adrien.g.treuille@gmail.com
File Name: examples/run_all_examples.py
Class Name:
Method Name:


Project Name: streamlit/streamlit
Commit Name: 04519f15e750d1508c5c6bd6888210bdce348802
Time: 2018-11-23
Author: adrien.g.treuille@gmail.com
File Name: examples/run_all_examples.py
Class Name:
Method Name: