static: fix some valid flake8 issues
Metadata
Current evaluation
Merged. Fixed unused typing imports flagged by flake8 across five Python files. Changes were approved, passed CI checks, and integrated into the codebase.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes that remove unused typing imports flagged by flake8 across multiple Python files, resolving static analysis warnings. |
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 after fixing flake8 errors in setup.py. Approved by two reviewers with zero unresolved comments. The commit modified two files, adding 102 and removing 103 lines. | |
| #932 feat: replace flake8 + plugins and isort with ruff | charmcraft | merged | Merged after approval and passing CI checks, replacing flake8, plugins, and isort with ruff to resolve CI instability from dependency conflicts. Updated six files to streamline Python linting. | |
| #1745 static tests: upgrade to the newest flake8 | snapcraft | merged | Merged upgrade to the latest flake8 version, resolving all detected linting violations across nine files. The change passed CI checks and received reviewer approval. | |
| #92 flake8 support | charmcraft | merged | Merged. Adds .flake8 config to standardize linting, excludes .git and venv to prevent slow manual scans, updates tests to use it, and fixes a minor PEP8 docstring formatting issue. Approved and merged. |