7721c80b327aaa6f5207b4babca80e4935996e42,tf_encrypted/protocol/__init__.py,,get_all_funcs,#,16

Before Change




def get_all_funcs() -> list:
    all_prot_methods = []
    all_prot_method_names = []

    protocols = [Pond(), SecureNN()]

    for protocol in protocols:
        methods = inspect.getmembers(Pond(), predicate=inspect.ismethod)
        for method in methods:
            if method[0] not in all_prot_method_names and method[0][0] is not "_":
                all_prot_method_names.append(method[0])
                all_prot_methods.append(method)

    return all_prot_methods


__all__ = [

After Change



    protocols = [Pond, SecureNN]
    for protocol in protocols:
        all_prot_method_names |= set(
            func_name
            for func_name, _ in inspect.getmembers(protocol, predicate=inspect.isfunction)
            if not func_name.startswith("_")
        )

    return all_prot_method_names

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: mortendahl/tf-encrypted
Commit Name: 7721c80b327aaa6f5207b4babca80e4935996e42
Time: 2019-02-27
Author: mortendahlcs@gmail.com
File Name: tf_encrypted/protocol/__init__.py
Class Name:
Method Name: get_all_funcs


Project Name: mozilla/bugbug
Commit Name: 9357b91c16118f2b7f29dcdd7e3f96934e1c4184
Time: 2019-06-03
Author: mcastelluccio@mozilla.com
File Name: bugbug/models/duplicate.py
Class Name: DuplicateModel
Method Name: get_labels


Project Name: commonsense/conceptnet5
Commit Name: 79d149dd39dc7e7d22c623c0a4a4d3ab99e61c76
Time: 2017-06-15
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: choose_small_vocabulary