rusackas commented on code in PR #36760:
URL: https://github.com/apache/superset/pull/36760#discussion_r2644006815


##########
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx:
##########
@@ -195,7 +195,8 @@ const SqlEditorLeftBar = ({ queryEditorId }: 
SqlEditorLeftBarProps) => {
 
   const handleDbList = useCallback(
     (result: DatabaseObject) => {
-      dispatch(setDatabases(result));
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      dispatch(setDatabases(result as any));

Review Comment:
   The `as any` cast bypasses a type mismatch between the QueryEditor interface 
and the TableSelector component's expected props. This component receives props 
from Redux state which has slightly different types than what TableSelector 
expects. Documented as technical debt.



##########
superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts:
##########
@@ -232,7 +232,8 @@ test('returns column keywords among selected tables', async 
() => {
     );
     storeWithSqlLab.dispatch(
       addTable(
-        { id: expectQueryEditorId },
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+        { id: expectQueryEditorId } as any,

Review Comment:
   Test files use partial mock objects by design. The test only needs the `id` 
property from QueryEditor to test the hook's behavior. Creating full 
QueryEditor objects for tests would add unnecessary complexity and make tests 
harder to maintain.



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