vincbeck commented on code in PR #28900:
URL: https://github.com/apache/airflow/pull/28900#discussion_r1262678233
##########
airflow/models/dag.py:
##########
@@ -1378,6 +1379,37 @@ def normalized_schedule_interval(self) ->
ScheduleInterval:
_schedule_interval = self.schedule_interval
return _schedule_interval
+ @staticmethod
+ @internal_api_call
+ @provide_session
+ def fetch_callback(
+ dag: DAG,
+ dagrun: DagRun | DagRunPydantic,
+ success: bool = True,
+ reason: str | None = None,
+ session: Session = NEW_SESSION,
+ ):
Review Comment:
If I add annotations then mypy will analyse the code and mypy-core will
complain about:
```
airflow/models/dag.py:1411: error: TypedDict "Context" has no key "reason"
[typeddict-unknown-key]
context["reason"] = reason
```
I spent a lot of time trying to resolve it with no chance. If you have any
solution I am definitely interested. The only solution I could find to bypass
this problem is to not add annotations. This might feel like I am hiding an
issue, but this is how it is today, I dont introduce something new, I just keep
it as is
--
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]