chore: linting
Metadata
Current evaluation
Merged in #1215 (commit 927ce1e4), replacing an unnecessary str() call in a test fixture with a string literal to satisfy Ruff UP018.
Resolution: closed resolved
Reason: PR #1215 was approved and merged as commit 927ce1e4, applying the one-line linting fix described in its body.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Replaces the `str` call with a string literal to appease ruff:
```
lint-ruff
UP018 [*] Unnecessary `str` call (rewrite as a literal)
--> tests/unit/test_project.py:659:31
|
657 | "stage-snaps": ["pebble/latest/stable"],
658 | "stage": ["bin/pebble"],
659 | "override-prime": str(
| _______________________________^
660 | | "craftctl default\n"
661 | | "/bin/mkdir -p var/lib/pebble/default/layers\n"
662 | | "/bin/chmod 777 var/lib/pebble/default"
663 | | ),
| |_____________^
664 | }
665 | }
|
help: Replace with string literal
```
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [ ] I've added or updated any relevant documentation.
- [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in #1215 (commit 927ce1e4), replacing an unnecessary str() call in a test fixture with a string literal to satisfy Ruff UP018. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/rockcraft#1215 (927ce1e4), replacing an unnecessary str() call in tests/unit/test_project.py with a string literal to satisfy Ruff. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a linting fix replacing an unnecessary str() call with a string literal in tests/unit/test_project.py to resolve ruff error UP018. Approved by two reviewers and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a chore update replacing an unnecessary str() call with a string literal in test_project.py to resolve ruff linting error UP018. The change passed all lint and test checks and was successfully integrated. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #543 chore(lint): remove isort | rockcraft | merged | Merged #543 in commit 041e3d23, removing isort and using Ruff's import-sorting checks to consolidate lint configuration. | |
| #375 chore(lint): Remove trailing whitespace | rockcraft | merged | Merged PR #375 removed trailing whitespace from one file (+4/-4), resolving yamllint complaints; landed as commit 777df7e3. | |
| #22 chore(lint): update ruff and config | starbase | merged | Merged in canonical/starbase#22 via commit f3d35a6, updating Ruff and its config to ignore excessive test-function arguments (PLR0913). | |
| #36 chore: switch to ruff | craft-platforms | merged | Merged PR #36 as commit ce5f6b9, switching linting and formatting to Ruff, updating configuration, and applying fixes across seven files. | |
| #575 chore(lint): silent false positive for PLC0206 | craft-application | closed | PR #575 (silencing Ruff PLC0206 false positives, bumping ruff in pre-commit) was not merged; the author closed it as duplicated by #580, which was merged as commit 97347705 fixing ruff 0.8 lint issues. | |
| #103 chore: fix new lints from ruff 0.12 | craft-grammar | merged | Merged PR #103 as a3ef1dd, updating Ruff to 0.12 and fixing resulting lint errors across four files; cherry-picked from canonical/starbase#409. | |
| #715 chore(lint): use ruff from snap | craft-parts | merged | Merged PR canonical/craft-parts#715 (commit e0ecddb2, +3/-2 across 3 files): applied craft-cli#250 so linting installs ruff via `sudo snap install ruff` instead of a uv/pip dependency. | |
| #369 chore: fix linting | imagecraft | merged | Merged PR #369 removed two redundant casts (1 file, +2/-2), fixing Ty linting; the lint/files check passed. | |
| #360 chore: remove now-deprecated linter rule | starbase | merged | Merged as commit 013b8e5, removing deprecated Ruff ANN10* configuration and resolving TOML validator complaints. | |
| #345 chore: hush some of the linter output | starbase | merged | Merged PR #345 quieted noisy linter tasks so earlier lint steps no longer flooded terminal output; landed as commit c9e090a. |