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
OS and version: Debian GNU/Linux 12 (bookworm) (running in WSL2 on Windows 11 Pro 22H2 22621.1848 Windows Feature Experience Pack 1000.22642.1000.0)
Python version (& distribution if applicable, e.g. Anaconda): 3.10.12
Code Snippet
The original content of the file a.py:
classA:
def__init__(self, x):
"""Make an A from an x. This is more complicated than you might expect. That's why it needs a more detailed description down here, separated from the summary by a blank line. """
After refactoring by moving the symbol into the file b.py:
classA:
def__init__(self, x):
"""Make an A from an x. This is more complicated than you might expect. That's why it needs a more detailed description down here, separated from the summary by a blank line. """
... note that the necessary blank line has disappeared from the docstring.
Repro Steps
Enable the "move symbol" refactoring feature ("python.analysis.refactoring.allowMovingSymbols": true, in settings.json).
Move a symbol which includes a docstring with a detailed description, separated from the summary by a blank line, to another file.
Note that it seems this problem affects all docstrings in the affected symbol (e.g. the docstrings for all methods in a class which is moved).
Expected behavior
The docstrings are preserved verbatim when the symbol has been refactored from file a.py to file b.py
Actual behavior
The docstrings are preserved in their textual content, but the required blank line between the summary and the detailed description is removed.
Logs
I can provide logs if necessary, but they're big so I'll only add them here if there's a specific need, the problem should be trivial to reproduce!
Great to see this refactoring feature approaching production, looking forward to seeing it make it into a release from prerelease!
The text was updated successfully, but these errors were encountered:
Environment data
Code Snippet
The original content of the file a.py:
After refactoring by moving the symbol into the file b.py:
... note that the necessary blank line has disappeared from the docstring.
Repro Steps
"python.analysis.refactoring.allowMovingSymbols": true,
in settings.json).Note that it seems this problem affects all docstrings in the affected symbol (e.g. the docstrings for all methods in a class which is moved).
Expected behavior
The docstrings are preserved verbatim when the symbol has been refactored from file a.py to file b.py
Actual behavior
The docstrings are preserved in their textual content, but the required blank line between the summary and the detailed description is removed.
Logs
I can provide logs if necessary, but they're big so I'll only add them here if there's a specific need, the problem should be trivial to reproduce!
Great to see this refactoring feature approaching production, looking forward to seeing it make it into a release from prerelease!
The text was updated successfully, but these errors were encountered: