style: fix findings from ruff 0.17, shfmt, and tombi
Metadata
Current evaluation
Merged PR fixing linting and style findings from ruff 0.17, shfmt, and tombi, plus adding ty diagnostic suppressions for intentional pydantic field narrowing.
Resolution: closed resolved
Reason: The PR was merged, addressing pre-existing lint errors from ruff 0.17, shfmt, and tombi, and adding ty suppressions to maintain CI green status.
Evaluated by: mr-cal-bot
No scores available.
Issue body
🤖 This message was generated by kimi-k3
Preparation for the Starbase sync, which enables ruff 0.17 (via pre-commit), shfmt (canonical/starbase#565), and tombi (canonical/starbase#597) as default-enabled tooling.
## What changed
- **ruff 0.17 findings**
- ISC004: parenthesize implicit string concatenations in `rockcraft/extensions/springboot.py`, `rockcraft/plugins/java_common.py`, and `tests/unit/test_pebble.py`
- ICN001: `import datetime as dt` convention in `rockcraft/services/package.py`, `rockcraft/services/project.py`, `tests/unit/test_oci.py`, `tests/unit/test_project.py`
- PTH118/PTH120/PERF403: pathlib modernizations in `tools/schema/schema.py`
- INP001: `noqa` comments for standalone config scripts (`extensions/django-framework/gunicorn.conf.py`, `extensions/flask-framework/gunicorn.conf.py`, `snap/local/sitecustomize.py`)
- **shfmt**: formatting of `tools/freeze-requirements.sh` and `tools/spread/{install_rockcraft,run_rockcraft,setup_maven_proxy}`
- **tombi**: formatting of test fixture `pyproject.toml` files (integration/spread fixtures only)
## Notes
- The root `pyproject.toml` tombi reformat is intentionally excluded here; it will land with the merge PR since it depends on merged content.
- These lint errors are pre-existing on main when linted with the latest ruff — CI installs ruff from snap, which is already at 0.17.
## Update (2026-10-19)
Also folds in suppressions for the `ty` override diagnostics (`invalid-mutable-override` on the Project model's intentional pydantic field narrowing, `invalid-attribute-override` on the test-only DevelProject stub), matching the established convention in charmcraft/snapcraft/imagecraft. This makes the base of the PR stack green for both ruff and ty.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR fixing linting and style findings from ruff 0.17, shfmt, and tombi, plus adding ty diagnostic suppressions for intentional pydantic field narrowing. |
Update history
| Date | Change |
|---|---|
| merged | |
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1737 style: fix linting for ruff 0.5 | charmcraft | merged | Merged PR #1737 as commit 8994523e, updating one file (+2/-6) to fix linting under Ruff 0.5. | |
| #1156 style: fix linting errors for ruff 0.12.0 | craft-parts | merged | Ruff 0.12.0 lint fixes merged as PR #1156 (commit eb82b792), correcting style violations in 5 files (+9/-12) after the ruff-pre-commit v0.12.0 bump in #407; all CI checks passed. | |
| #6493 style: ty 0.0.87, ruff 0.17.0 | snapcraft | merged | Merged PR updating ty to 0.0.87 and ruff to 0.17.0, with 7 AI-assisted commits fixing linting errors across 12 files. | |
| #173 style: fix lint for ruff 0.12 | craft-archives | merged | Merged PR #173 as commit 53d732e, fixing lint for Ruff 0.12 while retaining Ruff 0.11 compatibility; all CI checks passed. | |
| #408 style: fix linting for ruff 0.12 | starbase | merged | Merged PR #408 as commit dc41fe4, applying a one-line style change that restored linting compatibility with Ruff 0.12. | |
| #1323 style: fix new ruff warnings | rockcraft | merged | PR #1323 merged to main: hand-fixed minor new Ruff warnings in 3 files (+30/-20). Lint and all test suites passed; only source-spread-tests failed (unrelated to style change). | |
| #20 style: fix ruff issue | craft-platforms | merged | Merged PR #20 fixed a Ruff linting issue in one file (+1/-3); resolution is commit 71a165d. | |
| #6498 style: ty 0.0.87, ruff 0.17.0 | snapcraft | merged | Merged PR #6498, cherry-picking style fixes from #6493 onto hotfix/9.2 to update ty to 0.0.87 and ruff to 0.17.0. | |
| #803 style: fix linting issues with ruff 0.12 | craft-application | merged | Merged via commit 5e15ff09, fixing Ruff 0.12 lint failures across 14 files. A separate integration-test failure was fixed by #804. | |
| #969 style: fix linting issues for ruff 0.9 | craft-parts | merged | Merged as commit f1427855: small Ruff 0.9 lint fixes (+2/-1) across 2 files, following the ruff-pre-commit hook bump to the 0.9.x series. |