Skip to content

Potential inefficiency: Redundant namedtupledict call in run method of backend.py  #1040

@nimdrak

Description

@nimdrak

Description

I noticed a potential inefficiency at the end of the run method in

outputs_tuple = namedtupledict('Outputs', output_names)(*outputs)
return namedtupledict('Outputs', output_names)(*outputs)

The namedtupledict function is called twice back-to-back with the exact same arguments.
The method then immediately calls the same function again for the return statement.

//As-is
        outputs_tuple = namedtupledict('Outputs', output_names)(*outputs)
        return namedtupledict('Outputs', output_names)(*outputs)
//To-be
        return namedtupledict('Outputs', output_names)(*outputs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions