Closed den4uk closed 5 years ago
Black doesn't support setup.cfg as config files. It tries to parse the file as TOML, and evidently it's not valid TOML.
Hi, I'm getting this same error when using a .flake8
configuration file. I also tried with a .toml
, but it made no difference.
Python version: 3.7.4
Black version: 19.10b0
Running Windows 10
The .flake8
file:
[flake8]
ignore = E203, E266, E501, W503
max-line-length = 80
The error message:
Error: Could not open file .flake8: Error reading configuration file: This float doesn't have a leading digit (line 2 column 1 char 9)
Operating system: Linux Python version: 3.7.1 Black version: 19.3b0 Does also happen on master: yes, checked!
My
setup.cfg
file contains the following line:When
black
is pointed to read this config, the following error occurs:I believe when it sees the version number it thinks it's a float, but encounters a second dot and fails parsing it as a float.