Skip to content

--verbose mode should print location of project root #1880

@pachewise

Description

@pachewise

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:

  1. pyproject.toml
[tool.black]
target-version = ['py36']
line-length = 120
skip-string-normalization = true
exclude = '(.*/migrations/.*\.py)'
include = '.*/server/.*\.py$'
  1. create a python file with single strings
example = 'This is an example'
  1. 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:

  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: configurationCLI and configurationR: not a bugThis is deliberate behavior of Black.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedT: enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions