static: fix some valid flake8 issues
Metadata
Current evaluation
Merged as commit cfa69b164: PR #2902 by sergiusens removed 7 unused typing imports (F401) across 5 files in catkin.py, _pip.py, errors.py, _config.py and _status_cache.py, fixing flake8 findings.
Resolution: closed resolved
Reason: The PR itself was merged into the repo as commit cfa69b164 ("static: fix some valid flake8 issues (#2902)"), which appears in the history of snapcraft/internal/lifecycle/_status_cache.py, confirming the unused typing imports were dropped and the F401 warnings resolved.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This was mostly from running a flake8 from 3.9, but they are valid issue to
fix nonetheless.
Running flake8
./snapcraft/plugins/catkin.py:82:1: F401 'typing.Set' imported but unused
./snapcraft/plugins/_python/_pip.py:28:1: F401 'typing.Dict' imported but unused
./snapcraft/project/errors.py:19:1: F401 'typing.Dict' imported but unused
./snapcraft/project/errors.py:19:1: F401 'typing.List' imported but unused
./snapcraft/internal/project_loader/_config.py:24:1:
F401 'typing.List' imported but unused
./snapcraft/internal/project_loader/_config.py:24:1:
F401 'typing.Set' imported but unused
./snapcraft/internal/lifecycle/_status_cache.py:19:1:
F401 'typing.List' imported but unused
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit cfa69b164: PR #2902 by sergiusens removed 7 unused typing imports (F401) across 5 files in catkin.py, _pip.py, errors.py, _config.py and _status_cache.py, fixing flake8 findings. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #2902 by sergiusens was merged as commit cfa69b164, removing unused typing imports (F401) from catkin.py, _pip.py, project/errors.py, project_loader/_config.py and lifecycle/_status_cache.py. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2902 (commit cfa69b164) removed seven unused typing imports across five Snapcraft modules, resolving the reported flake8 F401 findings. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Fixed unused typing imports flagged by flake8 across five Python files. Changes were approved, passed CI checks, and integrated into the codebase. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes removing unused typing imports flagged by flake8 across multiple snapcraft Python files. Static analysis warnings resolved. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1559 static: fix flake8 errors in setup.py | snapcraft | merged | Merged PR #1559 fixed Flake8 errors in setup.py via commit 66954305e. | |
| #2420 static: update to the latest flake8 | snapcraft | merged | Merged PR updated flake8 to the latest version (LP #1807409) plus related static-check tweaks across 18 files (+34/-33); landed as commit 1b9a7d933. |