refactor icon indicating copy to clipboard operation
refactor copied to clipboard

(fix) Proposing a workaround for superfluous indentation on multi-lines

Open MementoRC opened this issue 3 years ago • 2 comments

May address issue:https://github.com/isidentical/refactor/issues/12 Was proposed to resolve wrapping a multi-line ast.Call into an ast.Await without having changes in the indentation of the secondary lines

The solution proposed is assuming that often the Replace would only change the first line of an ast.Expr and lose the original indentation (thus later on having to add it), however, the replacement ends-up having the original indentation for the lines that are left unchanged. The proposal is to check that the lines are indeed not the same before applying the block indentation

This is not robust, but more like a workaround

MementoRC avatar Dec 03 '22 22:12 MementoRC

Adding more clunk: Addressing the case of multi-lines F-string with parenthesis: https://github.com/isidentical/refactor/issues/74

MementoRC avatar Dec 24 '22 23:12 MementoRC

Thank you very much for the review. This is a learning exercise for me! I would like to go through your review and update the PR, so that it becomes less work on your side. I first needed to know that the approach is acceptable Also, I wanted to maintain the backward compatibility, in case I was missing something more intricate

MementoRC avatar Dec 25 '22 23:12 MementoRC