262c3f5c9d428cbb87b25ee26b37f14d498217e1,dipy/workflows/multi_io.py,IOIterator,set_inputs,#IOIterator#,222

Before Change


    def set_inputs(self, *args):
        self.file_existence_check(args)
        self.input_args = list(args)
        self.inputs = [sorted(glob(inp)) for inp in self.input_args
                       if type(inp) == str]

    def set_out_dir(self, out_dir):
        self.out_dir = out_dir

After Change


            if type(inp) == str:
                self.inputs.append(sorted(glob(inp)))
            if type(inp) == list:
                nested = [sorted(glob(i)) for i in inp if isinstance(i, str)]
                self.inputs.append(list(itertools.chain.from_iterable(nested)))

    def set_out_dir(self, out_dir):
        self.out_dir = out_dir
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: nipy/dipy
Commit Name: 262c3f5c9d428cbb87b25ee26b37f14d498217e1
Time: 2018-12-06
Author: skab12@gmail.com
File Name: dipy/workflows/multi_io.py
Class Name: IOIterator
Method Name: set_inputs


Project Name: pantsbuild/pants
Commit Name: 4be101000cb9179a9ee5edd1fc7e74af3a00348d
Time: 2020-02-15
Author: ericarellano@me.com
File Name: src/python/pants/rules/core/lint.py
Class Name:
Method Name: lint


Project Name: hanxiao/bert-as-service
Commit Name: 5abe8b315fd6cd79594f401626a03bf137507b99
Time: 2019-01-30
Author: hanhxiao@tencent.com
File Name: server/bert_serving/server/__init__.py
Class Name: BertSink
Method Name: _run