Update dedent_to to support blocks that are composed of comments#13572
Update dedent_to to support blocks that are composed of comments#13572
dedent_to to support blocks that are composed of comments#13572Conversation
|
dhruvmanila
left a comment
There was a problem hiding this comment.
Thanks! Can you update the adjust_indent test case at the bottom to include this case?
Where does it panic though? I see that the block is being added inside a dummy function body. Does it panic in |
ce64e1a to
95a09a1
Compare
|
|
Ah right, that's because the following is invalid syntax: def f():
# comment
# comment |
While looking into #13545 I noticed that we return
Nonehere if you pass a block of comments. This is annoying because it causesadjust_indentationto fall back to LibCST which panics when it cannot find a statement.