Copilot commented on code in PR #61077:
URL: https://github.com/apache/airflow/pull/61077#discussion_r2895879084
##########
airflow-core/tests/unit/cli/commands/test_dag_command.py:
##########
@@ -1070,3 +1074,29 @@ def
test_reserialize_should_support_multiple_bundle_name_arguments(self, configu
serialized_dag_ids =
set(session.execute(select(SerializedDagModel.dag_id)).scalars())
assert serialized_dag_ids == {"test_example_bash_operator",
"test_sensor"}
+
+ @conf_vars({("core", "load_examples"): "false"})
+ def test_reserialize_should_make_equal_hash_with_dag_processor(self,
configure_dag_bundles, session):
Review Comment:
The imports at lines 1077-1079 are inside the test method body rather than
at the module level. Per codebase coding guidelines (and general Python best
practices for Airflow), `from`/`import` statements should be at the top of the
file. None of the valid exceptions apply here (these are not needed for
circular import avoidance, worker isolation, or within a `TYPE_CHECKING`
block). These three imports — `DagFileParsingResult`,
`DagFileProcessorProcess`, `_RequestFrame`, `_ResponseFrame`,
`DagSerialization`, `LazyDeserializedDAG` — can be moved to the module-level
imports section.
--
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]