Operating system: macOS Mojave 10.14.5 (18F132)
Python version: Python 3.7.3
Black version: 19.3b0 (f3bb22a828)
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?
I have a proposed fix for this in #948 - open to review (cc: @zsol).
So, Python 3.9 actually considers the reproducer here to be invalid syntax, and that has broken the Black tests on Python 3.9. See https://github.com/psf/black/issues/1441#issuecomment-637733971 .