Taragolis commented on code in PR #39430:
URL: https://github.com/apache/airflow/pull/39430#discussion_r1590962541


##########
airflow/models/dag.py:
##########
@@ -4108,15 +4121,6 @@ def factory(*args, **kwargs):
     return wrapper
 
 
-STATICA_HACK = True
-globals()["kcah_acitats"[::-1].upper()] = False
-if STATICA_HACK:  # pragma: no cover
-    from airflow.models.serialized_dag import SerializedDagModel
-
-    DagModel.serialized_dag = relationship(SerializedDagModel)
-    """:sphinx-autoapi-skip:"""
-
-

Review Comment:
   Remove this lines, which are hack for the almost the same behaviour as 
TYPE_CHEKING will make `mypy` unhappy
   
   ```console
   ❯ mypy airflow/__init__.py
   
   airflow/__init__.py:125: error: Cannot determine type of
   "initialize_providers_list"  [has-type]
           manager.initialize_providers_list()
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow/__init__.py:126: error: Cannot determine type of
   "initialize_providers_hooks"  [has-type]
           manager.initialize_providers_hooks()
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow/__init__.py:127: error: Cannot determine type of
   "initialize_providers_extra_links"  [has-type]
           manager.initialize_providers_extra_links()
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ```
   
   For unknown (for me) reason this lines somehow breaks `mypy` checks, and as 
result it ignored some issues with methods decorated by
   
   
https://github.com/apache/airflow/blob/79286d6398e8e964a467de7f1e9fc10520bba00a/airflow/providers_manager.py#L365



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