chore: linting
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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 |
|---|---|---|---|---|
| #369 chore: fix linting | imagecraft | merged | Merged after resolving redundant casting linting errors flagged by Ty. Approved by two reviewers. Changes involved minimal edits (+2/-2 lines) across one file. CI lint and test checks passed prior to merge. | |
| #1099 chore: fix linting | craft-application | merged | Merged a linting fix to resolve unused directives flagged by Ty. The update modified two files, received approval from two reviewers, passed CI validation, and was successfully integrated. | |
| #585 chore(linter): misc fixes | craft-parts | merged | Merged linter fixes across 125 files. Approved by two reviewers and merged without squashing per maintainer request. | |
| #439 chore(linter): misc fix | rockcraft | merged | Merged linter chore PR fixing miscellaneous issues and an unexpected pyright error from a rebase onto main. Approved by two reviewers, changes span 16 files with 86 additions and 76 deletions. | |
| #1347 chore(deps): update ruff and fix new linting errors | charmcraft | merged | Merged after updating the ruff dependency and fixing new linting errors. Modifications were largely autoformatted across ten files. The changes received dual reviewer approval, passed CI checks, and were successfully integrated. | |
| #375 chore(lint): Remove trailing whitespace | rockcraft | merged | Merged changes removing trailing whitespace from one file to satisfy linters like yamllint. Approved by two reviewers, passed CI, and modified four lines. | |
| #359 chore(lint): update linters and fix linting issues with new rules | craft-parts | merged | Merged after updating linters and fixing linting issues under new rules. The change modified 13 files and was approved by one reviewer before integration. | |
| #5266 chore: fix gitignore entry | snapcraft | merged | Merged a .gitignore fix that incorrectly ignored parts/ directories project-wide. The update resolves unintended side effects and restores Ruff linting. Approved by two reviewers and passed CI. | |
| #115 chore(deps): update ruff and fix linting issue | craft-application | merged | Merged into main after two approvals and passing CI. The update refreshed the ruff dependency and resolved a linting issue across two files. Codecov recorded a negligible 0.10% coverage decrease upon merge. | |
| #543 chore(lint): remove isort | rockcraft | merged | Merged a pull request replacing isort with Ruff for linting. The update modifies three files to utilize Ruff's capabilities, streamlining the configuration. Approved by two reviewers. |