dstandish edited a comment on issue #5372: [AIRFLOW-3057] add prev_*_date_success to template context URL: https://github.com/apache/airflow/pull/5372#issuecomment-499367418 @pgagnon thanks. i updated with type hints. in some cases this required some new imports e.g. Session, Union, Optional. For Session I used sqlalchemy.orm.session.Session. States have type string because they are string class attributes not members of class State. Some of the mypy tests required some weird changes so as not to upset it. E.g.: * dag_run.py#L225 I added `assert isinstance(session, Session) # mypy` so it would not try to access `query` on `None` object * taskinstance.py#L570 Could not implicitly return `None`so I did ```return prev_ti and prev_ti.start_date``` instead of `if prev_ti: return prev_ti.start_date` * had to add some more asserts in tests
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
