Skip to content

hug_parens_with_braces_and_square_brackets: "Black produced code that is not equivalent to the source" error in preview mode on function call with two type:ignore comments #4036

Open
@DetachHead

Description

@DetachHead
foo(  # type:ignore
    [  # type:ignore
        a
    ]
)
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: /tmp/blk_qaa1dff6.log

--- src
+++ dst
@@ -29,8 +29,6 @@
         )  # /Call
     )  # /Expr
   type_ignores=
     TypeIgnore(
     )  # /TypeIgnore
-    TypeIgnore(
-    )  # /TypeIgnore
 )  # /Module
\ No newline at end of file

playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: crashBlack is crashingC: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.T: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions