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

   ## Problem
   
   The nightly `pre-commit checks` run fails in job `pre-commit (current)`, 
hook `mypy (main)`: `Found 3 errors in 2 files (checked 3015 source files)`. 
First failing run: https://github.com/apache/superset/actions/runs/39733547113 
(master 3297c39d94).
   
   - `superset/commands/export/assets.py:157` [arg-type] Argument 1 to "set" 
has incompatible type "list[int | str]"; expected "Iterable[int | None]"
   - `tests/unit_tests/commands/chart/export_test.py:403` [union-attr] Item 
"UUID" of "UUID | None" has no attribute "in_" (same for Item "None")
   
   Runtime behavior is unaffected.
   
   ## Root cause
   
   Introduced by #44347 (77ebc0e55f). The full-tree run passes 
`superset-core/src` to mypy, so `SqlaTable` takes `id: int` and `uuid: UUID | 
None` from `CoreDataset` 
(`superset-core/src/superset_core/common/models.py:186-187`), the first base in 
its MRO. PR-time runs only check changed files, leave `superset_core` 
unresolved, and see both attributes as `Any`, so #44347 passed. With those 
types, `referenced - set(dataset_ids)` at `assets.py:157` and 
`SqlaTable.uuid.in_(...)` at `export_test.py:403` no longer type-check.
   
   ## Steps to reproduce
   
   On unmodified master 3297c39d94, run `uvx [email protected] run mypy --all-files` 
(or `pre-commit run mypy --all-files`). It prints the same 3 errors.
   
   (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