keewis / blackdoc

run black on documentation code snippets
https://blackdoc.readthedocs.io
MIT License
47 stars 4 forks source link

update the vendored code #116

Closed keewis closed 2 years ago

keewis commented 2 years ago

black changed a lot since the last time I looked.

To stay as compatible as possible the vendored code should stay as close to the original as possible, but trying to only fall back to it if black removes the function does not make too much sense: we'd be importing private functions which can change at any moment. I'd be much more comfortable with that if the test suite was better, though.

keewis commented 2 years ago

Left to do (in new PRs):

The tests are not really reliable right now, though: tomli seems to have changed (e.g. TOMLDecodeError instead of TomlDecodeError) without it being caught by the nightly CI, and we don't even look at warnings that might have been emitted before that.

It would be really cool to have the nightly CI automatically open a new issue for each new warning type, just like it does for errors. Not sure how easy to implement that would be, though.