bito-code-review[bot] commented on PR #38084:
URL: https://github.com/apache/superset/pull/38084#issuecomment-3928788359

   <!-- Bito Reply -->
   Yes, the suggestion is valid — updating the return type to `Mock` accurately 
reflects what `mocker.Mock()` returns, and changing the parameter to 
`ReportScheduleType | str` matches the enum values passed in tests while 
maintaining flexibility.
   
   **tests/unit_tests/commands/report/update_test.py**
   ```
   def _make_model(
       mocker: MockerFixture,
       *,
       model_type: ReportScheduleType | str,
       database_id: int | None,
   ) -> Mock:
       model = mocker.Mock()
       model.type = model_type
       model.database_id = database_id
       model.name = "test_schedule"
       model.crontab = "0 9 * * *"
       model.last_state = "noop"
       model.owners = []
       return model
   ```


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