I have an issue with Black Python formatter in VSCode. It works perfectly with the VSCode parameters and now I work on a shared repository with a pyproject.toml configuration file.
This file includes a few configs for Black so we all share the same code formatting. But on this repo, Black does not format anything for me anymore.
This is what the Black config part look like
[tool.black]
# https://github.com/psf/black
target-version = ["py39"]
color = false
line-length = 120
exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| build
| venv
)/
'''
What is really weird to me is that the single line that seems to be the issue is color = true
.
If I remove it or even do color = false
, it works fine.
But I don't want to change a parameter for everyone on the repo because it fails on my computer...
Does anyone have any idea?
P.S: I am on Windows, could it be the reason? And if so, is there anything I can do about it?