potiuk commented on code in PR #33266:
URL: https://github.com/apache/airflow/pull/33266#discussion_r1290751524


##########
airflow/serialization/helpers.py:
##########
@@ -32,9 +32,10 @@ def serialize_template_field(template_field: Any) -> str | 
dict | list | int | f
     def is_jsonable(x):
         try:
             json.dumps(x)
-            return True
         except (TypeError, OverflowError):
             return False
+        else:

Review Comment:
   Agree. We have not used too much of the `try/except/else` but I started to 
like it, it's much more explicit than return false in this case.



-- 
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]

Reply via email to