Search code examples
pythonpre-commitpre-commit.compython-black

Black ignores skip-string-normalization flag


In my pre-commit configuration I have black version 19.10b0 and in pyproject.toml I have line:

skip-string-normalization = true

So my strings don't get double quotes normalized.

But then I run pre-commit autoupdate, black version upgrades to 20.8b1 and all strings get normalized to double quoted variant.

I don't understand why this happens, any reasons for that?

black changelog have nothing about strings or quotes between this two versions.

Also if I explicitly pass pyproject.toml to black (using args: [--config=./pyproject.toml] line) it still normalizes strings


Solution

  • Answer is given in a black issue

    It was a bug.

    But it will be shipped to release soon