lint: apply autoformat-black to source files
Metadata
Current evaluation
Merged following maintainer approval and passing CI. The update modifies the lint configuration to apply autoformat-black exclusively to source files, aligning it with test-black behavior.
Suggested action: —
No scores available.
Issue body
- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [X] Have you successfully run `./runtests.sh static`?
- [X] Have you successfully run `./runtests.sh tests/unit`?
-----
`autoformat-black` should only apply to source files, matching `test-black`.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged following maintainer approval and passing CI. The update modifies the lint configuration to apply autoformat-black exclusively to source files, aligning it with test-black behavior. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0, applying autoformat-black to source files to align with test-black. The change passed static and unit tests. Codecov noted a minor coverage decrease but did not block the merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Applied autoformat-black exclusively to source files to align with test-black linting. Codecov reported a 1.95% coverage decrease upon merge. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3865 lint: lint legacy code with black | snapcraft | merged | Merged updates to the test-black lint command to include legacy code, aligning it with autoformat-black. Approved by a maintainer, passed CI checks, and merged without affecting code coverage. | |
| #3853 lint: lint legacy code with black | snapcraft | merged | Merged following reviewer approval and passing CI. Applied Black formatting to legacy code across 12 files, resulting in 84 additions and 37 deletions. Code coverage remained stable at 88.16%. | |
| #3787 lint: apply black to parts directories | snapcraft | merged | Applied Black formatting to previously ignored snapcraft/parts/ and tests/unit/parts/ directories. Merged after reviewer approval and passing CI checks, with no impact on overall code coverage. | |
| #239 style(lint): autoformat | starbase | merged | Merged after approval. Applied automated linting to a single file, adjusting one line. The maintainer requested the merge post-review, completed without CI checks or unresolved comments. | |
| #1960 style(lint): move from black to ruff | charmcraft | merged | Merged after two approvals and passing CI. Replaced Black with Ruff across 122 files, updating 1778 lines and removing 557 to modernize the linting configuration. | |
| #315 style: use black for consistent and automated formatting | charmcraft | merged | Merged after two approvals. Adopted Black for automated formatting across 36 files, added a formatting test, and configured flake8 to ignore conflicting rules. Increased the line length limit to accommodate Black's output. | |
| #2180 code: use black as the standard style | snapcraft | merged | Merged after approval and CI checks. Adopted Black as the standard code formatter, reformatting 567 files with 39,831 additions and 33,762 deletions. Diff coverage reached 90.92%. | |
| #4067 lint: ignore files in .gitignore for black | snapcraft | merged | Merged changes to update Black linting configuration, replacing exclude with extend-exclude to properly respect .gitignore files. Exclusions for prime/ and stage/ are now limited to the project root. Coverage unchanged. | |
| #1491 style(autoformat): update black to 2024 | charmcraft | merged | Merged following two approvals. Updated the Black formatter to the 2024 version, auto-formatting Python code across five files. Reported test failures were unrelated and traced to an external dependency issue. | |
| #3722 static: black update to 22 syntax | snapcraft | merged | Merged update to Black formatter v22 syntax across 55 files. Approved by reviewer, passed CI, and integrated into main despite a minor 0.08% coverage decrease. |