You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pankajkoti (via GitHub)" <gi...@apache.org> on 2023/09/13 09:42:21 UTC
[GitHub] [airflow] pankajkoti commented on a diff in pull request #34260: Remove unnecessary call to keys() method on dictionaries
pankajkoti commented on code in PR #34260:
URL: https://github.com/apache/airflow/pull/34260#discussion_r1324257695
##########
airflow/providers/google/cloud/utils/field_validator.py:
##########
@@ -421,6 +421,8 @@ def validate(self, body_to_validate: dict) -> None:
:param body_to_validate: body that must follow the specification
:return: None
"""
+ if body_to_validate is None:
Review Comment:
I am slightly confused if it would make sense to update the type annotation to include None as an acceptable type only to raise an error. 🤔
##########
airflow/providers/google/cloud/utils/field_validator.py:
##########
@@ -421,6 +421,8 @@ def validate(self, body_to_validate: dict) -> None:
:param body_to_validate: body that must follow the specification
:return: None
"""
+ if body_to_validate is None:
Review Comment:
I am slightly confused if it would make sense to update the type annotation to include None as an acceptable type only to raise an error. 🤔
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org