You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/05 22:59:53 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #20011: Type-annotate SkipMixin and BaseXCom

potiuk commented on a change in pull request #20011:
URL: https://github.com/apache/airflow/pull/20011#discussion_r762628786



##########
File path: airflow/models/xcom.py
##########
@@ -376,4 +505,7 @@ def resolve_xcom_backend():
     return BaseXCom
 
 
-XCom = resolve_xcom_backend()
+if TYPE_CHECKING:
+    XCom = BaseXCom  # Hack to avoid Mypy "Variable 'XCom' is not valid as a type".
+else:
+    XCom = resolve_xcom_backend()

Review comment:
       I think this is question mostly to @mik-laj who knows more of the context. But I share the same sentiment and experience as @ashb - any time I tried I backtracked so far. And yea - we are using extremely old 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org