8631be9c0216055fa90e3fa0f5909ef68a3c1928,pytext/models/model.py,ModelInputMeta,__new__,#Any#Any#Any#Any#,34

Before Change


    def __new__(metacls, typename, bases, namespace):
        annotations = namespace.get("__annotations__", {})
        for t in annotations.values():
            if type(t) == type(Union):
                for ut in t.__args__:
                    _assert_tensorizer_type(ut)
            else:

After Change


    def __new__(metacls, typename, bases, namespace):
        annotations = namespace.get("__annotations__", {})
        for t in annotations.values():
            if getattr(t, "__origin__", "") is Union:
                for ut in t.__args__:
                    _assert_tensorizer_type(ut)
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: facebookresearch/pytext
Commit Name: 8631be9c0216055fa90e3fa0f5909ef68a3c1928
Time: 2019-06-25
Author: aimeeli@fb.com
File Name: pytext/models/model.py
Class Name: ModelInputMeta
Method Name: __new__


Project Name: onnx/onnxmltools
Commit Name: 8ce90a31df5c3784004816ff2dabfee506b4b424
Time: 2019-12-02
Author: xadupre@users.noreply.github.com
File Name: onnxmltools/convert/xgboost/_parse.py
Class Name:
Method Name: _parse_xgboost_simple_model


Project Name: pytorch/text
Commit Name: 889b03c66f434b4ea2a281b847751afc760b2c8b
Time: 2018-03-17
Author: martin.tutek@gmail.com
File Name: torchtext/data/batch.py
Class Name:
Method Name: _short_str