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

INTERNAL ERROR: Black produced code that is not equivalent to the source #1212

Closed
bersbersbers opened this issue Dec 20, 2019 · 1 comment
Closed
Labels
T: bug Something isn't working

Comments

@bersbersbers
Copy link

Describe the bug See title

To Reproduce

  1. Take attached file.
  2. Run Black on it without any argments
  3. See error

Expected behavior Works

Environment (please complete the following information):

C:\Work\Desktop>black bug.py
error: cannot format bug.py: INTERNAL ERROR: Black produced code that is not equivalent to the source.  Please report a bug on https://github.com/psf/black/issues.  This diff might be helpful: C:\Users\bersbersbers\AppData\Local\Temp\blk_sow6kszn.log
Oh no! 💥 💔 💥
1 file failed to reformat.

Log:

--- src
+++ dst
@@ -13,17 +13,17 @@
             None,  # NoneType
         )  # /arguments
       body=
         Pass(
         )  # /Pass
+        Pass(
+        )  # /Pass
       decorator_list=
       name=
         'bug',  # str
       returns=
         None,  # NoneType
       type_comment=
         None,  # NoneType
     )  # /FunctionDef
-    Pass(
-    )  # /Pass
   type_ignores=
 )  # /Module
  • Version: 19.10b0
  • OS and Python version: Windows/Linux, 3.7.5

Does this bug also happen on master? Yes (note indentation of last pass)

bug.py.txt

@bersbersbers bersbersbers added the T: bug Something isn't working label Dec 20, 2019
@zsol
Copy link
Collaborator

zsol commented Dec 20, 2019

This will be the same root cause as #569, let's keep the discussion there

@zsol zsol closed this as completed Dec 20, 2019
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

2 participants