Closed chris-bradley closed 2 years ago
Thank you for reporting this. I'm leaning to adding toml
as an explicit dependency as a short term low risk fix.
Sigh. They had to release it on a Friday didn't they? There will probably be other bug reports in the ecosystem not seen until Monday morning (and then a fresh batch as more people try the new black on Monday).
Thank you!
Touch wood v0.2.2 fixes this for you, but I don't want to make any more dramatic changes prior to addressing the broken continuous integration (#34).
@peterjc I don't see how https://github.com/peterjc/flake8-black/commit/65c9d577557fe397b0ebe8f41cf041a423789fcb fixes this issue, since only requirements.txt
is changed.
You'll need to update install_requires
in setup.py
in order to give setuptools adequate metadata to fetch the dependency when installing with pip.
You’re right :(
Didn’t have time to test it fully after dinner.
Since Black 21.7b0, released earlier today, flake8-black breaks on an import error when used with a freshly installed environment. The issue is due to the following commit: https://github.com/psf/black/pull/2301/commits/7e1acb74eb9e1a7e989cac4ed9242ae2950430cb Since
flake8-black
importstoml
without depending directly on it, freshly built environments fail with the following error:There are a few options to fix this:
toml
torequirements.txt
.toml
to usingtomli
.requirements.txt
to useblack
versions that depend upontomli
.toml.decoder.TomlDecodeError
totomli.decoder.TOMLDecodeError
. (Note the case change.)toml
and importtomli
instead, aliased totoml
.TomlDecodeError
.