dadadel / pyment

Format and convert Python docstrings and generates patches
GNU General Public License v3.0
905 stars 62 forks source link

Comments containing commented multi-line-(doc)strings #67

Closed wagnerpeer closed 2 years ago

wagnerpeer commented 6 years ago

For the following class, I would expect to generate an empty docstring if running pyment without parameters:

class Class(object):
    # '''some 
    # multi-line
    # comment
    # string'''
    pass

However the commented multi-line-string gets surrounded by docstring quotes.

Output:

--- a/issue67.py
+++ b/issue67.py
@@ -1,6 +1,9 @@
 class Class(object):
-    # '''some 
+    """# '''some
     # multi-line
     # comment
-    # string'''
+    # string
+
+
+    """
     pass

To me it looks like a similar issue #58