ashb commented on PR #24486:
URL: https://github.com/apache/airflow/pull/24486#issuecomment-1238140077

   I tried adding a `airflow/models/__init__.pyi` containing this:
   
   ```python
   # MyPy doesn't/can't recoginze the PEP 562 style lazy imports, so we have to
   # tell it about the imports
   
   from .dag import DAG
   from .base import ID_LEN
   from .xcom import XCOM_RETURN_KEY
   from .base import Base
   from .baseoperator import BaseOperator
   from .baseoperator import BaseOperatorLink
   from .connection import Connection
   from .dagbag import DagBag
   from .dag import DagModel
   from .dagpickle import DagPickle
   from .dagrun import DagRun
   from .dag import DagTag
   from .db_callback_request import DbCallbackRequest
   from .errors import ImportError
   from .log import Log
   from .mappedoperator import MappedOperator
   from .operator import Operator
   from .param import Param
   from .pool import Pool
   from .renderedtifields import RenderedTaskInstanceFields
   from .skipmixin import SkipMixin
   from .slamiss import SlaMiss
   from .taskfail import TaskFail
   from .taskinstance import TaskInstance
   from .taskreschedule import TaskReschedule
   from .trigger import Trigger
   from .variable import Variable
   from .xcom import XCom
   from .taskinstance import clear_task_instances
   
   def import_all_models(): ...
   ```
   
   But I ended up with loads of errors along the lines of:
   
   ```
   airflow/www/views.py:109: error: Module "airflow.models" has no attribute 
"Connection"  [attr-defined]
   ```
   
   I wonder what is going on ... Any ideas?


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