sadpandajoe opened a new issue, #46066:
URL: https://github.com/apache/superset/issues/46066

   ## Problem
   
   The nightly full-repo `pre-commit (next)` job fails on master in the `mypy 
(main)` hook with 4 errors in 2 files: 
https://github.com/apache/superset/actions/runs/42346025717/job/128323840298
   
   - `tests/unit_tests/sql/execution/test_executor.py:648` [union-attr] Item 
"None" of "Any | None" has no attribute "equals"
   - `tests/unit_tests/sql/execution/test_query_history.py:372` and `:688` 
[union-attr] Item "None" of "Any | None" has no attribute "to_dict"
   - `tests/unit_tests/sql/execution/test_query_history.py:793` [operator] 
Unsupported right operand type for in ("str | None")
   
   The previous nightly (run 42173316153) was green.
   
   ## Root cause
   
   #45993 added assertions that use `StatementResult.data` (`pd.DataFrame | 
None`, `superset-core/src/superset_core/queries/types.py:102`) and 
`QueryResult.error_message` (`str | None`, `types.py:130`) without a None 
check. Per-PR mypy only sees the changed files, so superset-core types collapse 
to `Any`. The full-repo run includes the superset-core sources and sees the 
real types. Runtime behavior is correct; this is a test-typing defect.
   
   ## Steps to reproduce
   
   On master at b92fcb2061:
   
   ```
   uvx --from mypy==1.15.0 mypy --check-untyped-defs --no-incremental 
tests/unit_tests/sql/execution/test_executor.py 
tests/unit_tests/sql/execution/test_query_history.py 
superset-core/src/superset_core/queries/types.py
   ```
   
   This prints the 4 errors above. Without the superset-core file on the 
command line it prints none.
   
   (Found via automated investigation — [Agor](https://agor.live/).)
   


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