eumiro commented on code in PR #33898:
URL: https://github.com/apache/airflow/pull/33898#discussion_r1310700381
##########
airflow/providers/amazon/aws/utils/__init__.py:
##########
@@ -66,8 +66,8 @@ def datetime_to_epoch_us(date_time: datetime) -> int:
def get_airflow_version() -> tuple[int, ...]:
- val = re.sub(r"(\d+\.\d+\.\d+).*", lambda x: x.group(1), version)
- return tuple(int(x) for x in val.split("."))
+ match = re.match(r"(\d+)\.(\d+)\.(\d+)", version)
Review Comment:
That's the difference between `re.search` (anywhere in the string),
`re.match` (at the beginning) and `re.fullmatch` (both beginning and end). You
do not have to add `^` at the beginning of a `re.match` pattern.
--
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]