ashb commented on code in PR #54421:
URL: https://github.com/apache/airflow/pull/54421#discussion_r2362235913


##########
task-sdk/src/airflow/sdk/definitions/context.py:
##########
@@ -71,12 +77,12 @@ class Context(TypedDict, total=False):
     task_instance: RuntimeTaskInstanceProtocol
     task_instance_key_str: str
     # `templates_dict` is only set in PythonOperator
-    templates_dict: dict[str, Any] | None
+    templates_dict: NotRequired[dict[str, Any] | None]
     test_mode: bool
     ti: RuntimeTaskInstanceProtocol
     # triggering_asset_events: Mapping[str, Collection[AssetEvent | 
AssetEventPydantic]]
     triggering_asset_events: Any
-    try_number: int | None
+    try_number: NotRequired[int | None]

Review Comment:
   Not sure this one is NotRequired -- without looking at the rest of the code 
I would have thought this one is always present?



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