19b46a6467c190c44474565238b5c130e43255b8,wandb/sdk_py27/interface/_dtypes.py,ListType,from_obj,#Any#Any#,530

Before Change


            )
            for ndx, item in enumerate(py_list):
                _elm_type = elm_type.assign(item)
                if isinstance(_elm_type, InvalidType):
                    raise TypeError(
                        "List contained incompatible types. Item at index {}: \n{}".format(
                            ndx, elm_type.explain(item, 1)
                        )
                    )

                elm_type = _elm_type

            return cls(elm_type)

After Change


        if py_obj is None or not hasattr(py_obj, "__iter__"):
            raise TypeError("ListType.from_obj expects py_obj to by list-like")
        else:
            if hasattr(py_obj, "tolist"):
                py_list = py_obj.tolist()
            else:
                py_list = list(py_obj)
            elm_type = (
                UnknownType() if None not in py_list else OptionalType(UnknownType())
            )
            for item in py_list:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: wandb/client
Commit Name: 19b46a6467c190c44474565238b5c130e43255b8
Time: 2021-02-03
Author: tim.s.sweeney@gmail.com
File Name: wandb/sdk_py27/interface/_dtypes.py
Class Name: ListType
Method Name: from_obj


Project Name: arviz-devs/arviz
Commit Name: 2bcdff553a234d5d3bb9b4c55b1db3159334fcca
Time: 2019-11-14
Author: seth.axen@gmail.com
File Name: arviz/stats/stats.py
Class Name:
Method Name: loo


Project Name: brian-team/brian2
Commit Name: 65102dcc0cca9c1779955c12b523b07d1dc6d5ce
Time: 2019-02-13
Author: marcel.stimberg@inserm.fr
File Name: brian2/spatialneuron/spatialneuron.py
Class Name: SpatialNeuron
Method Name: spatialneuron_segment