| 1 |
def line_before_docstring(): |
| 2 |
|
| 3 |
"""Please move me up""" |
| 4 |
|
| 5 |
|
| 6 |
class LineBeforeDocstring: |
| 7 |
|
| 8 |
"""Please move me up""" |
| 9 |
|
| 10 |
|
| 11 |
class EvenIfThereIsAMethodAfter: |
| 12 |
|
| 13 |
"""I'm the docstring""" |
| 14 |
def method(self): |
| 15 |
pass |
| 16 |
|
| 17 |
|
| 18 |
class TwoLinesBeforeDocstring: |
| 19 |
|
| 20 |
|
| 21 |
"""I want to be treated the same as if I were closer""" |
| 22 |
|
| 23 |
|
| 24 |
class MultilineDocstringsAsWell: |
| 25 |
|
| 26 |
"""I'm so far |
| 27 |
|
| 28 |
and on so many lines... |
| 29 |
""" |
| 30 |
|
| 31 |
class SingleQuotedDocstring: |
| 32 |
|
| 33 |
"I'm a docstring but I don't even get triple quotes." |
| 34 |
|
| 35 |
# output |
| 36 |
|
| 37 |
|
| 38 |
def line_before_docstring(): |
| 39 |
"""Please move me up""" |
| 40 |
|
| 41 |
|
| 42 |
class LineBeforeDocstring: |
| 43 |
"""Please move me up""" |
| 44 |
|
| 45 |
|
| 46 |
class EvenIfThereIsAMethodAfter: |
| 47 |
"""I'm the docstring""" |
| 48 |
|
| 49 |
def method(self): |
| 50 |
pass |
| 51 |
|
| 52 |
|
| 53 |
class TwoLinesBeforeDocstring: |
| 54 |
"""I want to be treated the same as if I were closer""" |
| 55 |
|
| 56 |
|
| 57 |
class MultilineDocstringsAsWell: |
| 58 |
"""I'm so far |
| 59 |
|
| 60 |
and on so many lines... |
| 61 |
""" |
| 62 |
|
| 63 |
|
| 64 |
class SingleQuotedDocstring: |
| 65 |
"I'm a docstring but I don't even get triple quotes." |