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


##########
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:
   Well, it seems correct, however, it can be none, meaning it can be not set, 
and so that is why I left it as not required, logically we always have a try 
number, however, maybe it is only updated right before we render the task, and 
so it can be not required



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