black icon indicating copy to clipboard operation
black copied to clipboard

Add regression tests for Black’s previous inconsistent quote formatting with adjacent string literals

Open rdrll opened this issue 9 months ago • 2 comments

Description

Issue #3623 appears to be resolved, added regression tests to monitor this formatting issue and track any potential recurrence.

Regression tests were created based on Black's current stable version (25.1.0) formatting results, see Black Playground.

Checklist - did you ...

  • [ ] Add an entry in CHANGES.md if necessary?
  • [x] Add / update tests if necessary?
  • [ ] Add new / update outdated documentation?

rdrll avatar Feb 19 '25 06:02 rdrll

Given the name of this file fstring.py the tests could be merged into it, but I'm largely indifferent to if they are merged or get their own file so I'll leave that choice to the people with merge power. Other than that LGTM, thanks for the contribution!

MeGaGiGaGon avatar Feb 19 '25 08:02 MeGaGiGaGon

Thanks for adding the label. I separated it since #3623's root cause is unclear and may differ from existing f-string coverage. Having a seperate test file could potentially ease future investigation, but I’m fine with either approach.

rdrll avatar Feb 19 '25 17:02 rdrll