potiuk commented on code in PR #34744:
URL: https://github.com/apache/airflow/pull/34744#discussion_r1401952963
##########
airflow/utils/timezone.py:
##########
@@ -273,3 +279,24 @@ def _format_part(key: str) -> str:
if not joined:
return "<1s"
return joined
+
+
+@lru_cache(maxsize=None)
+def parse_timezone(name: str | int) -> Timezone | FixedTimezone:
Review Comment:
I'd be for leaving it as is - with name. The int is really kind of
backcompat - I can't see anyone using int to specify it in the future and
while we want to keep positionally specified parameter as int for backcompat
and possibly some interna usage, the keyword should be `name` - that would also
guide the user who uses keyword to use actual name not I'd if timezone where
using keyword parameter.
It's a strong indicator for the user of that function that they are supposed
to use string.
--
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]