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


##########
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:
   I didn't even think it should be none. By the time it gets to a worker, try 
number will always be a positive integer.



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