Skip to content

Black produced different code on the second pass of the formatter: Explicit line join in the first line #922

@dizzy57

Description

@dizzy57

Operating system: macOS Mojave 10.14.5 (18F132)
Python version: Python 3.7.3
Black version: 19.3b0 (f3bb22a)
Does also happen on master: yes

Minified reproducer:

\


pass

Black diff:

--- source
+++ first pass
@@ -1,5 +1,3 @@
-\
-

 pass

--- first pass
+++ second pass
@@ -1,3 +1,2 @@
-
 pass

Looks like some kind of boundary condition in EmptyLineTracker?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: unstable formattingFormatting changed on the second passT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions