eladkal commented on code in PR #53477:
URL: https://github.com/apache/airflow/pull/53477#discussion_r2377884799
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -1421,3 +1425,10 @@ def __exit__(self, exctype, excinst, exctb) -> bool:
logger = logging.getLogger(__name__)
logger.exception(excinst)
return True
+
+# --- Helper functions ---
+def normalize_labels_dict(labels: dict) -> dict:
+ """
+ Return a copy of the labels dict with all None values replaced by empty
strings.
+ """
+ return {k: ('' if v is None else v) for k, v in labels.items()}
Review Comment:
```suggestion
return {k: ("" if v is None else v) for k, v in labels.items()}
```
To fix static checks
--
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]