aminghadersohi commented on PR #44683:
URL: https://github.com/apache/superset/pull/44683#issuecomment-5884270035

   Addressed the additional suggestions from bito runs #08df9f and #6d3f73 in 
9ca51efaf7:
   
   - **Untyped lambda side effect**: the autouse fixture uses a typed 
module-level helper, `_all_schemas_accessible(database, catalog, schemas) -> 
set[str]`.
   - **Fixture mock mutated in test**: `test_tables_schema_not_accessible` and 
`test_tables_schema_check_unexpected_error` patch 
`get_schemas_accessible_by_user` locally instead of changing the autouse 
fixture's mock.
   - **Redundant untyped alias**: removed `db_mock`. The three "not called" 
assertions loop over the lookup names, which keeps each line under 88 
characters.
   - **Missing test local type hint / unmapped backend KeyError** 
(`commands_tests.py`): `schema_name: str | None = 
self.default_schema_backend_map.get(...)`, and the test is skipped when the 
backend has no mapping.
   - **Redundant duplicate mock patch** (`test_tables_unknown_schema`): no 
change. The autouse fixture patches `get_schemas_accessible_by_user`, not 
`get_datasources_accessible_by_user` (see the `schemas_accessible_by_user` 
fixture at the top of `tests/unit_tests/commands/databases/tables_test.py`). 
The local patch is the only mock of `get_datasources_accessible_by_user`, and 
`assert_not_called()` needs it.
   
   The actionable items from #08df9f are answered on their threads. The 
line-length one was fixed in 11d2fc2448. The branch is also merged with the 
latest master (f0ed4b7ebe).
   


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