ephraimbuddy commented on code in PR #40197:
URL: https://github.com/apache/airflow/pull/40197#discussion_r1639408169
##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -20,14 +20,19 @@
from typing import TYPE_CHECKING
import redshift_connector
+from packaging.version import Version
from redshift_connector import Connection as RedshiftConnection
from sqlalchemy import create_engine
from sqlalchemy.engine.url import URL
+from airflow import __version__ as AIRFLOW_VERSION
from airflow.exceptions import AirflowException
from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
from airflow.providers.common.sql.hooks.sql import DbApiHook
+_IS_AIRFLOW_2_10_OR_HIGHER = Version(Version(AIRFLOW_VERSION).base_version) >=
Version("2.10.0")
Review Comment:
```suggestion
_IS_AIRFLOW_2_10_OR_HIGHER = Version(AIRFLOW_VERSION) >= Version("2.10.0")
```
##########
airflow/providers/openlineage/utils/utils.py:
##########
@@ -57,6 +59,7 @@
log = logging.getLogger(__name__)
_NOMINAL_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
+_IS_AIRFLOW_2_10_OR_HIGHER = Version(Version(AIRFLOW_VERSION).base_version) >=
Version("2.10.0")
Review Comment:
```suggestion
_IS_AIRFLOW_2_10_OR_HIGHER = Version(AIRFLOW_VERSION) >= Version("2.10.0")
```
There's no need for the base_version
--
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]