Uh oh!
There was an error while loading. Please reload this page.
replace unnecessary dict comprehension by dict() in core - #33858
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| def _execute_python_callable_in_subprocess(self, python_path: Path, tmp_dir: Path): | ||
| op_kwargs: dict[str, Any] = {k: v for k, v in self.op_kwargs.items()} | ||
| op_kwargs: dict[str, Any] = dict(self.op_kwargs.items()) |
There was a problem hiding this comment.
| op_kwargs: dict[str, Any] =dict(self.op_kwargs.items()) | |
| op_kwargs: dict[str, Any] =self.op_kwargs.copy() |
There was a problem hiding this comment.
op_kwargs type is Mapping that doesn't have copy() method
There was a problem hiding this comment.
Then dict(self.op_kwargs) should work, I think.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
| lineage[meta.task_id]["outlets"] = meta.value | ||
| return {"task_ids": {k: v for k, v in lineage.items()}} | ||
| return {"task_ids": lineage.copy()} |
There was a problem hiding this comment.
| return {"task_ids": lineage.copy()} | |
| return {"task_ids": dict(lineage)} |
Otherwise you've got a copy of defaultdict rather than dict
There was a problem hiding this comment.
Don’t think that’d be problematic though?
There was a problem hiding this comment.
I agree with @Taragolis, I should avoid any change in the values in this refactor PR
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit 6a33d05)
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.