pyupgrade is changing https://github.com/quantumblacklabs/kedro/blob/0.17.5/kedro/pipeline/node.py#L504 to use a generator instead. I'm not sure/haven't looked into why, but this actually may be a bit slower (tested with a slight modification):
>>> timeit('foo(*[node_inputs[item] for item in node_inputs])', 'foo = lambda *args: None; node_inputs=list(range(1000))', number=100000)
3.4650831540000127
>>> timeit('foo(*(node_inputs[item] for item in node_inputs))', 'foo = lambda *args: None; node_inputs=list(range(1000))', number=100000)
4.6001044469999215
I don't think the performance is a major concern, but maybe pyupgrade shouldn't change this aggressively, if there's no clear benefit (and some people may prefer the list stylistically).
pyupgradeis changing https://github.com/quantumblacklabs/kedro/blob/0.17.5/kedro/pipeline/node.py#L504 to use a generator instead. I'm not sure/haven't looked into why, but this actually may be a bit slower (tested with a slight modification):I don't think the performance is a major concern, but maybe
pyupgradeshouldn't change this aggressively, if there's no clear benefit (and some people may prefer the list stylistically).