turbaszek commented on a change in pull request #20570:
URL: https://github.com/apache/airflow/pull/20570#discussion_r776694306
##########
File path: airflow/providers/google/cloud/hooks/dataproc.py
##########
@@ -69,7 +69,7 @@ def __init__(
if properties is not None:
self.job["job"][job_type]["properties"] = properties
- def add_labels(self, labels: dict) -> None:
+ def add_labels(self, labels: Optional[dict]) -> None:
Review comment:
If I remember correctly we were using `Optional` to indicate that the
parameter is optional and usually has default value of `None` as described in
[docs](https://docs.python.org/3/library/typing.html#typing.Optional). So I
would suggest:
```suggestion
def add_labels(self, labels: Optional[dict] = None) -> None:
```
to be consistent, WDYT?
--
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]