Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extention ignores user configured indentation. #75

Open
MinekPo1 opened this issue May 21, 2022 · 2 comments
Open

Extention ignores user configured indentation. #75

MinekPo1 opened this issue May 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@MinekPo1
Copy link

Steps to reproduce:

  1. Set indent to anything different then 4 spaces
  2. 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")
  1. 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.

@reka
Copy link
Contributor

reka commented May 26, 2022

Hi @MinekPo1,

Thanks a lot for reporting this issue. 👍

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. 🙈

We'll look into it and let you know when there's a fix.

Cheers,
Reka

@MinekPo1
Copy link
Author

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!

@Hellebore Hellebore added the bug Something isn't working label Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants