uranusjr commented on code in PR #34744:
URL: https://github.com/apache/airflow/pull/34744#discussion_r1347193374


##########
airflow/serialization/serialized_objects.py:
##########
@@ -162,9 +163,9 @@ def encode_timezone(var: Timezone) -> str | int:
     )
 
 
-def decode_timezone(var: str | int) -> Timezone:
+def decode_timezone(var: str | int) -> Timezone | FixedTimezone:

Review Comment:
   But not eventually huh. This is so bad. (Maybe we should bite the bullet and 
transition all the Airflow internals to rely on the standard `tzinfo` interface 
instead. That’s a big undertaking though and shouldn’t be in this PR. I guess 
this is the right annotation going forward.



##########
airflow/serialization/serialized_objects.py:
##########
@@ -162,9 +163,9 @@ def encode_timezone(var: Timezone) -> str | int:
     )
 
 
-def decode_timezone(var: str | int) -> Timezone:
+def decode_timezone(var: str | int) -> Timezone | FixedTimezone:

Review Comment:
   But not eventually huh. This is so bad. (Maybe we should bite the bullet and 
transition all the Airflow internals to rely on the standard `tzinfo` interface 
instead. That’s a big undertaking though and shouldn’t be in this PR. I guess 
this is the right annotation going forward.



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