You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/10/20 08:54:32 UTC

[I] mypy fails in nightly pre-commit: Optional StatementResult.data indexed in test_async_results.py [superset]

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

   ### Problem
   
   The nightly `pre-commit checks` run fails in `pre-commit (current)`, hook `mypy (main)`, on master 1e18d01d7: https://github.com/apache/superset/actions/runs/39379980076
   
   ```
   tests/unit_tests/sql/execution/test_async_results.py:755: error: Value of type "Any | None" is not indexable  [index]
   tests/unit_tests/sql/execution/test_async_results.py:894: error: Value of type "Any | None" is not indexable  [index]
   ```
   
   The previous nightly (https://github.com/apache/superset/actions/runs/39210291965) passed.
   
   ### Root cause
   
   #45348 (f0cfaff78) added `test_async_results.py:755` and `:894`, which index `result.statements[0].data[...]` without ruling out `None`. `StatementResult.data` is `pd.DataFrame | None` (`superset-core/src/superset_core/queries/types.py:102`; `None` is for DML). The error only shows when superset-core sources are on the mypy command line, because the `superset_core.*` override uses `follow_imports = "skip"` otherwise, so #45348's own CI passed.
   
   ### Steps to reproduce
   
   On master 7b23ddea9:
   
   1. `pre-commit run mypy --files tests/unit_tests/sql/execution/test_async_results.py` passes.
   2. `pre-commit run mypy --files tests/unit_tests/sql/execution/test_async_results.py $(git ls-files 'superset-core/src/*.py')` fails with the two errors above.
   
   (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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] mypy fails in nightly pre-commit: Optional StatementResult.data indexed in test_async_results.py [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe closed issue #45516: mypy fails in nightly pre-commit: Optional StatementResult.data indexed in test_async_results.py
URL: https://github.com/apache/superset/issues/45516


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org