chore: fix broken pre-commit hooks#60
Merged
semarj merged 5 commits intoShipEngine:mainfrom Apr 23, 2026
Merged
Conversation
black 20.8b1 was broken against click>=8.1 (ImportError: _unicodefun), and flake8 3.9.2 was broken on Python 3.12 (EntryPoints.get removed). Bumps black, flake8, their transitive plugins, and blacken-docs to currently-maintained versions.
Modern black does not recognize 'safe' as a pyproject config key and emits "Invalid config keys detected: 'safe'" on every run. --safe is still the default CLI behavior, so removing the key is a no-op for actual formatting.
Applies black 24.10.0 formatting to the repo (mostly trailing-comma and blank-line-after-module-docstring changes from 4 years of black style evolution) and fixes the 29 E501 line-length errors plus 1 D419 empty-docstring that the upgraded flake8 surfaced. Bundled together because the formatting hook and the lint hook block each other in intermediate states — keeping them in one commit avoids a red midpoint in the series.
black ^22.0.0 -> ^24.0.0 and flake8 ^6.0.0 -> ^7.0.0 so that 'poetry run black' / 'poetry run flake8' (and editor integrations using the poetry venv) produce the same output as the pre-commit hooks. Regenerates poetry.lock; transitive bumps are scoped to black/flake8 deps only (packaging, pycodestyle, pyflakes, typing-extensions).
Keeps the pre-commit hook and the poetry dev-dep on the exact same flake8 version so local and CI runs can't diverge.
semarj
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pre-commit hooks are still silently broken:
black 20.8b1crashes against modernclick(ImportError: _unicodefun)flake8 3.9.2crashes on Python 3.12 (EntryPoints.getremoved)Bumped both (plus their plugins) to current versions, then applied the resulting black 24 reformat and fixed the 30 flake8 errors that surfaced.
Also updated
pyproject.toml's dev-deps to match, sopoetry run black/flake8and editor integrations don't drift from what pre-commit enforces.poetry.lockonly picks up the expected transitive bumps (packaging, pycodestyle, pyflakes, typing-extensions).All hooks green, 36/36 tests pass.