Skip to content

Reformat Python code with Black and enforce via GitLab CI

intrigeri requested to merge format-python-force-all-tests into stable

At some point I'd like to move to the much faster and 99.9% compatible ruff format (related: #20049 (closed)) but this seems premature. And running ruff format . on this branch changes so little that it'll be very easy to switch later. So I figured let's first go with Black.

Also, 88 chars is a little bit too wide for me when I don't work from my office. But I know that segfault prefers even longer lines, so I decided to embrace Black's defaults as a reasonable trade-off, and avoid opening this can of worms.

refs #19306 (closed), hoping this will be the least controversial aspect of it :)

… and then got into a rabbit hole trying to become friends with mypy on my own free time. If you prefer I can move these commits to a dedicated MR so we can merge the Black reformatting more easily / faster.

Edited by intrigeri

Merge request reports