Skip to content

fix: preserve the indentation characters of the original code - #380

Open
kelly-eclipse wants to merge 1 commit into
PyCQA:masterfrom
kelly-eclipse:fix/docstring-indent
Open

fix: preserve the indentation characters of the original code#380
kelly-eclipse wants to merge 1 commit into
PyCQA:masterfrom
kelly-eclipse:fix/docstring-indent

Conversation

@kelly-eclipse

Copy link
Copy Markdown

Fixes #379

Use the indentation characters of the docstring's opening as the
indentation for the lines inside the docstring, instead of replacing
them with spaces. Similarly, the use of tokenize.untokenize needs
to preserve the whitespace that was used, to avoid changing the
indentation of the original code.

Use the indentation characters of the docstring's opening as the
indentation for the lines inside the docstring, instead of replacing
them with spaces. Similarly, the use of `tokenize.untokenize` needs
to preserve the whitespace that was used, to avoid changing the
indentation of the original code.
@kelly-eclipse

Copy link
Copy Markdown
Author

This may resolve #265 and #278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indentation characters of the original code are not preserved

1 participant