40298ad9b45f3d51e7fb4453301550d745ed98de,featuretools/primitives/base/utils.py,,inspect_function_args,#Any#Any#Any#,9

Before Change


    argspec = getargspec(function)
    kwargs = {}
    if argspec.defaults is not None:
        lowest_kwargs_position = len(argspec.args) - len(argspec.defaults)

    for i, arg in enumerate(argspec.args):
        if arg == "time":
            if not uses_calc_time:

After Change


def inspect_function_args(new_class, function, uses_calc_time):
    // inspect function to see if there are keyword arguments
    kwargs = {}
    args = signature(function).parameters.values()
    for arg in args:
        if arg.name == "time":
            if not uses_calc_time:
                raise ValueError(""time" is a restricted keyword.  Please"
                                 " use a different keyword.")
            else:
                new_class.uses_calc_time = True
        if arg.default is not arg.empty:
            kwargs[arg.name] = arg.default
    return new_class, kwargs
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: Featuretools/featuretools
Commit Name: 40298ad9b45f3d51e7fb4453301550d745ed98de
Time: 2019-04-09
Author: inboxjeff@outlook.com
File Name: featuretools/primitives/base/utils.py
Class Name:
Method Name: inspect_function_args


Project Name: ilastik/ilastik
Commit Name: dfd62d12e5dcaa0984df1c8cd7dae6db5345f34c
Time: 2011-06-28
Author: christoph.straehle@iwr.uni-heidelberg.de
File Name: lazyflow/operators/valueProviders.py
Class Name: ListToMultiOperator
Method Name: notifyConnect


Project Name: suavecode/SUAVE
Commit Name: 843753bc258e3054da0bf662576010163399d368
Time: 2014-04-04
Author: aerialhedgehog@gmail.com
File Name: trunk/SUAVE/Methods/Performance/evaluate_mission.py
Class Name:
Method Name: evaluate_mission