-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
T: bugSomething isn't workingSomething isn't working
Description
Describe the bug
The following code can not be formatted
with (a,b): # type: something
passwhen run with these arguments:
$ black example.pyThe error is:
error: cannot format example.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: /tmp/blk_o04ck2zv.log
Oh no! 💥 💔 💥
1 file failed to reformat.
Environment
python -m black, 23.3.1.dev10+geb32729 (compiled: no)
Python (CPython) 3.11.3
Additional context
--- src
+++ dst
@@ -5,30 +5,29 @@
Pass(
) # /Pass
items=
withitem(
context_expr=
- Tuple(
+ Name(
ctx=
Load(
) # /Load
- elts=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'a', # str
- ) # /Name
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'b', # str
- ) # /Name
- ) # /Tuple
+ id=
+ 'a', # str
+ ) # /Name
+ optional_vars=
+ None, # NoneType
+ ) # /withitem
+ withitem(
+ context_expr=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'b', # str
+ ) # /Name
optional_vars=
None, # NoneType
) # /withitem
type_comment=
'something', # str
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T: bugSomething isn't workingSomething isn't working