

def generate_generic_calls(base, ns):
    methods = (m for m in METHODS if (m.split('.', 1)[0] == base))
    for method in methods:
        call_name = method.split('.', 1)[1]
        if (call_name not in ns):
            call_class = _get_call_class(method)
            generic_call = GenericCall(call_class)
            generic_call.__name__ = str(call_name)
            generic_call.__doc__ = METHODS[method]
            ns[call_name] = generic_call
            if (('__all__' in ns) and (call_name not in ns['__all__'])):
                ns['__all__'].append(call_name)
        elif (not ns[call_name].__doc__):
            ns[call_name].__doc__ = METHODS[method]

dataset/ETHPy150Open jasonkeene/python-ubersmith/ubersmith/calls/__init__.py generate_generic_calls/original