-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Describe the bug A clear and concise description of what the bug is.
Black 20.8b1 does not respect skip-string-normalization = true in the pyproject.toml
To Reproduce Steps to reproduce the behavior:
- pyproject.toml
[tool.black]
target-version = ['py36']
line-length = 120
skip-string-normalization = true
exclude = '(.*/migrations/.*\.py)'
include = '.*/server/.*\.py$'
- create a python file with single strings
example = 'This is an example'
- run
black <filename> --check --diff
from same directory as pyproject.toml (which is root repo dir)
Expected behavior A clear and concise description of what you expected to happen.
No changes would be applied by black given our pyproject.toml. Note that if you pass --config
to that same command it works.
Environment (please complete the following information):
- Version: 20.8b1
- OS and Python version: macOS 10.15.7, Python 3.7.2 (but target version is 3.6)
Does this bug also happen on master? To answer this, you have two options:
Yes with:
- Or run Black on your machine:
- create a new virtualenv (make sure it's the same Python version);
- clone this repository;
- run
pip install -e .
;- make sure it's sane by running
python -m unittest
; and- run
black
like you did last time.
Additional context Add any other context about the problem here.
We haven't normalized our strings yet because it's a ~30k line change (we plan to in the coming months). Noting that it seems to be a general "not respecting pyproject.toml" issue but string normalization was the most obvious thing.