bito-code-review[bot] commented on code in PR #44148:
URL: https://github.com/apache/superset/pull/44148#discussion_r4141015836


##########
tests/unit_tests/mcp_service/chart/test_compile.py:
##########
@@ -766,3 +766,29 @@ def test_aggregation_ambiguity_returns_validation_errors() 
-> None:
     )
     assert len(errors) == 1
     assert errors[0].error_code == "AMBIGUOUS_DATASET_REFERENCE"
+
+
+@patch("superset.commands.chart.data.get_data_command.ChartDataCommand")
+@patch("superset.common.query_context_factory.QueryContextFactory")
+def test_compile_chart_returns_structured_error_for_malformed_gantt_form_data(
+    mock_factory, mock_cmd_cls
+):

Review Comment:
   <!-- Bito Reply -->
   The suggestion to add type annotations (`mock_factory: Mock`, `mock_cmd_cls: 
Mock`, and `-> None`) to the new test function is valid and aligns with the 
project's typing standards. Applying these annotations improves code clarity 
and ensures compatibility with static analysis tools like mypy. You should 
apply this suggestion.
   
   **tests/unit_tests/mcp_service/chart/test_compile.py**
   ```
   @patch("superset.commands.chart.data.get_data_command.ChartDataCommand")
   @patch("superset.common.query_context_factory.QueryContextFactory")
   def 
test_compile_chart_returns_structured_error_for_malformed_gantt_form_data(
       mock_factory: Mock, mock_cmd_cls: Mock
   ) -> None:
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to