← Back to issue list

Remove black

View original Github issue

Metadata

Project
craft-cli
Number
#305
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Removed the black dependency due to Python 3.8 incompatibility, replacing it with ruff for code formatting. The change was transposed from charmcraft, approved by two reviewers, and merged after passing CI checks.

Suggested action:

No scores available.

Issue body

- [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `tox`? The version of black was not supported with Python 3.8, the alternative was to switch to the snap version of black. The commit affecting pyproject.toml and tox.ini is transposed from https://github.com/canonical/charmcraft/commit/d2b40dfbece3e9cc8577c19407c2dedbc30e9d2f and https://github.com/canonical/charmcraft/commit/9583793226b73478b9af24d649f0c1ca2b83c9bb with the exception of the ISC ignore in pyproject.toml The second commit is a result of the ruff formatting

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Removed the black dependency due to Python 3.8 incompatibility, replacing it with ruff for code formatting. The change was transposed from charmcraft, approved by two reviewers, and merged after passing CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged. Removed the black formatter due to Python 3.8 incompatibility. Changes were adapted from the charmcraft repository and replaced with ruff for code formatting.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1378 build: replace `black` with `ruff format` in charmcraft templates charmcraft merged Merged after two approvals and passing CI. Replaced black with ruff format in charmcraft templates to reduce dependencies, and bumped ops to 2.8. Monetization concerns were addressed and approved.
78%
#363 chore: remove use of black in favor of ruff starbase merged Merged a maintainer's change removing dangling references to the black formatter and replacing it with ruff. Approved by two reviewers, passed CI, and modified one file with minimal changes.
76%
#119 style: replace black with ruff formatter craft-archives merged Merged after approval by two reviewers. Replaced the Black code formatter with Ruff across 14 files, resulting in 42 additions and 21 deletions. The update successfully modernizes the project's formatting toolchain.
75%
#1084 build(style): switch from black to ruff craft-parts merged Merged after approval by two reviewers and passing all CI checks. Switches the code formatter from Black to Ruff via two commits that update configuration and autoformat 32 files.
73%
#212 style: replace black formatter with ruff format starbase merged Merged the replacement of Black with Ruff format. Approved by two reviewers, the change updates seven files with 26 additions and 10 deletions to standardize project styling.
70%