Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black does not capture cases of strings separated by a space #1362

Closed
aveach opened this issue Apr 24, 2020 · 3 comments
Closed

Black does not capture cases of strings separated by a space #1362

aveach opened this issue Apr 24, 2020 · 3 comments
Labels
T: bug Something isn't working

Comments

@aveach
Copy link

aveach commented Apr 24, 2020

Description:
Looks like in cases where a continuous string is written with a space, black incorrectly formats it as two separate strings.

Steps to Reproduce:
Block in file that needs formatting in file:

help='Drops purgeable caches before taking the footprint to reduce '
'run-to-run variance'

Running: black . changes it to:

help="Drops purgeable caches before taking the footprint to reduce " "run-to-run variance",

Environment:

  • Version: 19.10b0
  • OS and Python version: Ubuntu 18.04 -- Python3.6.10

Does this bug also happen on master?
Yes

@aveach aveach added the T: bug Something isn't working label Apr 24, 2020
@chevignon93
Copy link

This doesn't look like a continuous string with a space to me.

@ichard26
Copy link
Collaborator

ichard26 commented Apr 28, 2020

I agree with chevignon93, the example provided is not a continuous string with a space.
A quick sanity check of print(help) returns "Drops purgeable caches before taking the footprint to reduce ".

Regardless of that, I haven't been able to reproduce the bug on my local machine, nor on the Black Playground on master and stable.

Environment

  1. Version: 19.10b0
  2. OS and Python version: Windows 10 Home Edition Build 18363 & CPython 3.8.1

@JelleZijlstra
Copy link
Collaborator

If the intended bug here is that the strings aren't merged, this is a duplicate of #26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants