You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I indent code, I keep empty lines indented to the same indentation as the next non-empty line below them.
An example of this can be seen just in the comments of this python function for example:
#Note: tabs have been replaced with .... for seeing the difference
def create_dir(dir_path):
...."""
....Create a directory if it does not already exist.
....
....Args:
........dir_path (str): The directory path to create.
...."""
However when the formatter is run, The indentation is removed, leaving me with
#Note: tabs have been replaced with .... for seeing the difference
def create_dir(dir_path):
...."""
....Create a directory if it does not already exist.
....Args:
........dir_path (str): The directory path to create.
...."""
Please note: I am using v9.10.4. I am running VSCode's autoformat key when this issue occurs. It may be possible that this is a problem with my VSCode settings but I don't believe it is. I can post my vscode settings file if needed.
Is this something the extension is doing for everyone or is there something with my settings I need to change?
I will move this post from Q&A to Ideas if this is something prettier format does.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I indent code, I keep empty lines indented to the same indentation as the next non-empty line below them.
An example of this can be seen just in the comments of this python function for example:
However when the formatter is run, The indentation is removed, leaving me with
Please note: I am using v9.10.4. I am running VSCode's autoformat key when this issue occurs. It may be possible that this is a problem with my VSCode settings but I don't believe it is. I can post my vscode settings file if needed.
Is this something the extension is doing for everyone or is there something with my settings I need to change?
I will move this post from Q&A to Ideas if this is something prettier format does.
Beta Was this translation helpful? Give feedback.
All reactions