← Back to issue list

Use black as the default code formatter

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1779765
Type
issue
State
closed
Author
~sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged canonical/snapcraft#2180, adopting Black as the standard Python style and reformatting 567 files in commit 96da199ac.

Resolution: closed resolved

Reason: The maintainer linked snapcraft#2180, which merged as commit 96da199ac and made Black the standard Python formatter.

Evaluated by: mr-cal-bot

No scores available.

Issue body

black (https://github.com/ambv/black) is building up to be what gofmt is to the go community. Even though the syntax is not in total agreement with what I personally consider stylish, I'd rather have a machine just check for style and end all discussions we have had about how to order and make things look. This will also simplify our hacking guide in some ways.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged canonical/snapcraft#2180, adopting Black as the standard Python style and reformatting 567 files in commit 96da199ac.
stealth/space-bunny-alpha — closed resolved Black became Snapcraft’s standard formatter when PR snapcore/snapcraft#2180 merged as 96da199ac, reformatting 567 files.
stealth/space-bunny-alpha — closed resolved Black was adopted as the standard formatter by snapcraft/snapcraft#2180 (commit 96da199ac).
qwen/qwen3.6-35b-a3b — — Proposed adopting black as the default code formatter to automate style checks and simplify documentation. With zero comments and no implementation, the suggestion was closed and abandoned.
qwen/qwen3.6-35b-a3b — — Adopting black as the default code formatter was closed without discussion or implementation. The proposal to automate style checks and simplify the hacking guide was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without discussion or implementation, indicating the proposal to adopt black as the default code formatter was abandoned. No formatting standards were updated.
qwen3.6-35b-a3b-mtp-q6 — — The proposal to adopt black as the default code formatter was closed without discussion or implementation, indicating the suggestion was abandoned. No formatting changes were applied.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#2180 (confidence 100%)

    Merged PR adopting Black as the standard Python style, directly referenced by the maintainer.

Related issues

Issue Project State Summary Similarity
#2180 code: use black as the standard style snapcraft merged Merged PR #2180 made Black the standard Python style, reformatting 567 files; merge commit 96da199ac.
84%
#1491 style(autoformat): update black to 2024 charmcraft merged Merged PR #1491 in commit 15273c6b, updating Black to the 2024 style and reformatting five Python files.
74%
#315 style: use black for consistent and automated formatting charmcraft merged Merged Black formatting across 36 files, added a formatting test, and ignored flake8 E203/W503 for Black compatibility in charmcraft#315 (merge commit ad135981).
72%
#3787 lint: apply black to parts directories snapcraft merged Merged PR #3787 in commit 79985df1, applying Black formatting to six files under snapcraft/parts/ and tests/unit/parts/, which Black previously ignored.
71%