0d66931e6da93fda1c07388e6a2ed16d9a129040,src/syft/core/store/store_memory.py,MemoryStore,get_objects_of_type,#MemoryStore#Any#,33

Before Change


        self.post_init()

    def get_objects_of_type(self, obj_type: type) -> Set[AbstractStorableObject]:
        results = set()
        for key, obj in self._objects.items():
            if isinstance(obj.data, obj_type):
                results.add(obj)

        return results

    @syft_decorator(typechecking=True)
    def __sizeof__(self) -> int:
        return self._objects.__sizeof__()

After Change


        self.post_init()

    def get_objects_of_type(self, obj_type: type) -> Set[AbstractStorableObject]:
        return {obj for obj in self.values() if isinstance(obj.data, obj_type)}

    @syft_decorator(typechecking=True)
    def __sizeof__(self) -> int:
        return self._objects.__sizeof__()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 10

Instances


Project Name: OpenMined/PySyft
Commit Name: 0d66931e6da93fda1c07388e6a2ed16d9a129040
Time: 2020-08-29
Author: jason.paumier@gmail.com
File Name: src/syft/core/store/store_memory.py
Class Name: MemoryStore
Method Name: get_objects_of_type


Project Name: CyberReboot/NetworkML
Commit Name: 13f71c5eec807cbd8a368686fa7acd8d78be2303
Time: 2020-03-19
Author: josh@vandervecken.com
File Name: networkml/featurizers/funcs/host.py
Class Name: Host
Method Name: _row_keys


Project Name: OpenMined/PySyft
Commit Name: 52e0d5cdef928da25c104b872552cfb8fa3b7853
Time: 2021-03-21
Author: me@madhavajay.com
File Name: src/syft/lib/python/set.py
Class Name: Set
Method Name: upcast


Project Name: pandas-dev/pandas
Commit Name: d2c0674541892e2d349e7dc5ff91ad96b201fa77
Time: 2020-10-28
Author: contribute@tensortable.com
File Name: pandas/core/accessor.py
Class Name: DirNamesMixin
Method Name: _dir_additions