sourcery-vscode
sourcery-vscode copied to clipboard
Extention ignores user configured indentation.
Steps to reproduce:
- Set indent to anything different then 4 spaces
- Write any code which sorcery suggests a refactoring, which spreads over multiple lines. For example:
def foo():
a = []
for i in range(10):
a.append(f"a very long string to force a newline {i} yes this is very long")
- Accept the refactoring.
Expected:
The refactoring uses user configured indentation.
Behavior:
The refactoring always uses four spaces for indentation.
This is especially bad, if the user uses tabs for indentations since unless fixed by the user this will cause an error.
Hi @MinekPo1,
Thanks a lot for reporting this issue. :+1:
I've tried to reproduce it with multiple examples and it seems it varies whether Sourcery follows the indentation or always adds the 4 spaces. :see_no_evil:
We'll look into it and let you know when there's a fix.
Cheers, Reka
I've also seen the extension splitting lines on the 70 char mark, which I personally don't mind, but I feel like being able to configure that would be nice!