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


##########
providers/github/src/airflow/providers/github/operators/github.py:
##########
@@ -23,13 +23,15 @@
 from github import GithubException
 
 from airflow.exceptions import AirflowException
-from airflow.models import BaseOperator
 from airflow.providers.github.hooks.github import GithubHook
+from airflow.providers.github.version_compat import BaseOperator
 
 if TYPE_CHECKING:
-    try:
+    from airflow.providers.github.version_compat import AIRFLOW_V_3_0_PLUS
+
+    if AIRFLOW_V_3_0_PLUS:

Review Comment:
   I think Context should **ALSO** be added to version_compat and imported from 
there. One of the points of this move are to make sure the "ifs" are only in 
compat - and the imports are from there - this makes it super easy to remove 
the ifs later.



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