Wrong reformatting of multi-line strings

When I have a multiline string it is reformatted so that it changes the string with unnecessary white-spaces, is there any way I can change this behavior.

Before formatting:

After reformatting(Ctrl+Alt+L):

2
1 comment

Hmm, I didn't find a way to completely disable that, unfortunately. But, if you want to have an indented multiline string literal, you can define it as follows:

def foo():
a = '''
foobar
'''

 

0

Please sign in to leave a comment.