6e5850a6563671394a570a427298af9c4f3c2621,src/biotite/sequence/annotation.py,Annotation,__add__,#Annotation#Any#,338

Before Change


        if isinstance(item, Annotation):
            feature_list = self._features
            feature_list.extend(item._features)
            return Annotation(feature_list)
        elif isinstance(item, Feature):
            feature_list = self._features
            feature_list.append(item)
            return Annotation(feature_list)

After Change


        if isinstance(item, Annotation):
            return Annotation(self._features | item._features)
        elif isinstance(item, Feature):
            return Annotation(self._features | set([item]))
        else:
            raise TypeError(
                f"Only "Feature" and "Annotation" objects are supported, "
                f"not {type(item).__name__}"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: biotite-dev/biotite
Commit Name: 6e5850a6563671394a570a427298af9c4f3c2621
Time: 2018-11-22
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/annotation.py
Class Name: Annotation
Method Name: __add__


Project Name: snorkel-team/snorkel
Commit Name: 90fa42738c0c76a13cfe7d9dfb439662b4e961d6
Time: 2016-08-22
Author: stephenhbach@gmail.com
File Name: snorkel/viewer.py
Class Name: Viewer
Method Name: get_labels


Project Name: facebookresearch/pytext
Commit Name: 0a2a023816745921e438cd6eebf183d36d518b9e
Time: 2020-04-21
Author: akshats@fb.com
File Name: pytext/metric_reporters/seq2seq_compositional.py
Class Name: Seq2SeqCompositionalMetricReporter
Method Name: stringify_annotation_tree