Skip to content

Remove use of Black entirely#277

Merged
lucyb merged 1 commit into
lucyb/upgrade-pythonfrom
steve/remove-black-to-fix-python-upgrade
Jul 2, 2026
Merged

Remove use of Black entirely#277
lucyb merged 1 commit into
lucyb/upgrade-pythonfrom
steve/remove-black-to-fix-python-upgrade

Conversation

@StevenMaude

Copy link
Copy Markdown
Contributor

The Black formatter was conflicting with Ruff.

$ just fix
…
"/usr/bin/just" _compile requirements.prod.in requirements.prod.txt
"/usr/bin/just" _compile requirements.dev.in requirements.dev.txt
$BIN/black .
All done! ✨ 🍰 ✨
6 files left unchanged.
$BIN/ruff check --fix .
Found 2 errors (2 fixed, 0 remaining).

then:

$ just check
…
$BIN/black --check .
would reformat /workspaces/osgithub/osgithub/__init__.py
would reformat /workspaces/osgithub/setup.py

Oh no! 💥 💔 💥
2 files would be reformatted, 4 files would be left unchanged.
error: Recipe `black` failed on line 98 with exit code 1

It's possible that maybe we could tweak the settings of one or other to match. But it's preferable to simplify things here.

Let's just remove Black because using Ruff alone:

  • fixes this issue
  • removes several dependencies
  • is faster
  • is how we work with other repositories

The Black formatter was conflicting with Ruff.

```
$ just fix
…
"/usr/bin/just" _compile requirements.prod.in requirements.prod.txt
"/usr/bin/just" _compile requirements.dev.in requirements.dev.txt
$BIN/black .
All done! ✨ 🍰 ✨
6 files left unchanged.
$BIN/ruff check --fix .
Found 2 errors (2 fixed, 0 remaining).
```

then:

```
$ just check
…
$BIN/black --check .
would reformat /workspaces/osgithub/osgithub/__init__.py
would reformat /workspaces/osgithub/setup.py

Oh no! 💥 💔 💥
2 files would be reformatted, 4 files would be left unchanged.
error: Recipe `black` failed on line 98 with exit code 1
```

It's possible that maybe we could tweak the settings of one or other to
match. But it's preferable to simplify things here.

Let's just remove Black because using Ruff alone:

* fixes this issue
* removes several dependencies
* is faster
* is how we work with other repositories
@lucyb
lucyb merged commit 6b4b6fe into lucyb/upgrade-python Jul 2, 2026
4 checks passed
@lucyb
lucyb deleted the steve/remove-black-to-fix-python-upgrade branch July 2, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants