potiuk commented on a change in pull request #20234:
URL: https://github.com/apache/airflow/pull/20234#discussion_r769609761
##########
File path: airflow/providers/google/cloud/operators/cloud_build.py
##########
@@ -910,8 +910,9 @@ class BuildProcessor:
def __init__(self, build: Union[Dict, Build]) -> None:
if isinstance(build, Build):
- self.build = Build(build)
- self.build = deepcopy(build)
+ self.build: Union[Dict, Build] = Build(build)
+ else:
+ self.build = cast(Dict, deepcopy(build))
Review comment:
t complained without it - but I can double check it. I think mypy was
not able to infer the types of deepcopy from an union. But let's hold off with
this one - I do not really like the `# type: ignore` where Google libraries are
not following strict-optional and I think I have found a way to solve it
(especially that we have many more of similar cases in dataproc and biquery so
if we could avoid the ignores in those cases we could fix literally hundred of
errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]