Copilot commented on code in PR #51419:
URL: https://github.com/apache/airflow/pull/51419#discussion_r2132617305
##########
airflow-core/tests/unit/serialization/test_serialized_objects.py:
##########
@@ -278,6 +303,37 @@ def __len__(self) -> int:
DAT.CONNECTION,
lambda a, b: a.get_uri() == b.get_uri(),
),
+ (
+ TaskCallbackRequest(
+ filepath="filepath",
+ ti=TI,
+ bundle_name="testing",
+ bundle_version=None,
+ ),
+ DAT.TASK_CALLBACK_REQUEST,
+ lambda a, b: a.ti == b.ti,
+ ),
+ (
+ DagCallbackRequest(
+ filepath="filepath",
+ dag_id="fake_dag",
+ run_id="fake_run",
+ bundle_name="testing",
+ bundle_version=None,
+ ),
+ DAT.DAG_CALLBACK_REQUEST,
+ lambda a, b: a.dag_id == b.dag_id,
+ ),
+ (Asset.ref(name="test"), DAT.ASSET_REF, lambda a, b: a.name == b.name),
+ (
+ DeadlineAlert(
+ reference=cast("DeadlineReference",
DeadlineReference.DAGRUN_LOGICAL_DATE),
Review Comment:
Typelib.cast’s first argument should be a type, not a string. Use
cast(DeadlineReference, DeadlineReference.DAGRUN_LOGICAL_DATE) for clarity and
correct typing.
```suggestion
reference=cast(DeadlineReference,
DeadlineReference.DAGRUN_LOGICAL_DATE),
```
--
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]