FrancescoCastaldi commented on PR #45036: URL: https://github.com/apache/superset/pull/45036#issuecomment-6082314559
Hi @gabotorresruiz, Thanks for the suggestions! I have applied both fixes in commit a857ad3f06: 1. Updated `_rebind` to accept `Sequence[Subject | None]` and imported `Sequence` from `collections.abc` in `superset/models/dashboard.py` to fix the invariance type error. 2. Removed the unused `# type: ignore[arg-type]` comment in `tests/unit_tests/subjects/test_creator_group_call_sites.py` since `copy_dashboard` accepts `target: Any`. All 42 unit tests in `tests/unit_tests/subjects/test_creator_group_call_sites.py` and `tests/unit_tests/models/dashboard_test.py` pass cleanly. Regarding `get_user_subject(target.id)` at `after_insert` time: I agree with your observation that the user Subject row creation happens later in the lifecycle. Keeping the lookup safe here makes sense for now, and opening a dedicated follow-up issue to address the Subject timing and integration harness sounds like the right approach. Thanks again for the thorough review and guidance! Francesco -- 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]
