As an alternative to #123, here's a hook to automate synchronizing
the black hook and the additional_dependencies entry of blackdoc.
I'm not sure if the way I implemented that hook (a regex) is
particularly reliable (besides the fact that multi-line regexes are
clearly not something I'm comfortable with), but using pyyaml for
this would strip any comments / reformat some entries, and
ruamel.yaml / ruyaml seem to struggle with maintenance (at least,
that's the impression I get).
As an alternative to #123, here's a hook to automate synchronizing the
black
hook and theadditional_dependencies
entry ofblackdoc
.I'm not sure if the way I implemented that hook (a regex) is particularly reliable (besides the fact that multi-line regexes are clearly not something I'm comfortable with), but using
pyyaml
for this would strip any comments / reformat some entries, andruamel.yaml
/ruyaml
seem to struggle with maintenance (at least, that's the impression I get).pre-commit run --all-files