static: mypy requires __init__.py
Metadata
Current evaluation
Merged. Added missing __init__.py files to resolve mypy type hint errors and work around mypy bug #1645. Fixed an unused import warning noted in review. CI checks passed.
Suggested action: —
No scores available.
Issue body
Add missing __init__.py to workaround python/mypy#1645
Fix mypy type hint issues in the code found from this.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Added missing __init__.py files to resolve mypy type hint errors and work around mypy bug #1645. Fixed an unused import warning noted in review. CI checks passed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged after adding a missing __init__.py to resolve mypy type checking errors and unused import warnings. The update implements a workaround for mypy bug #1645 and corrects type hints throughout the affected modules. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Added missing __init__.py to resolve mypy type checking errors and unused import warnings. The fix addressed static analysis issues and was integrated into the main branch. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1747 static tests: enable type checking by use of mypy | snapcraft | merged | Merged after two approvals and passing CI. Enabled mypy type checking for static tests by resolving initial type errors and removing dead storeapi compat code. Integrated into runtests.sh static, deferring unit package init typing as a TODO. | |
| #1706 style: drop mypy, pyright | craft-parts | merged | Merged after approval and passing CI. Replaced mypy and pyright with ty for type checking across 88 files. Redundant isinstance checks were deferred to a separate issue. |