github.com/cheshirekow/buildtools@v0.0.0-20200224190056-5d637702fe81/build/testdata/059.golden (about)

     1  if foo:
     2      def f():
     3          """This docstring
     4          should be moved 4 spaces to the right.
     5  
     6          @returns:
     7            nothing
     8          """
     9          pass
    10  
    11  if bar:
    12      def g():
    13          """This docstring
    14          should be moved 8 spaces to the left.
    15  
    16  This particular line has just 4 leading spaces, so it should be moved only 4 spaces to the left.
    17  
    18          @returns:
    19            nothing
    20          """
    21          pass
    22  
    23  if foobar:
    24      def h():
    25          """This docstring is already indented properly, therefore shouldn't be reindented,
    26          but the trailing spacees from this and the following lines should be removed.
    27  
    28            “Unicode” characters aren't escaped.
    29          """
    30  
    31  if barfoo:
    32      def abc():
    33          " Single-line docstrings aren't changed "
    34          pass
    35  
    36  def aaa():
    37      """
    38      Docstring for top-level def statements
    39        are also fixed.
    40  
    41        “Unicode” characters aren't escaped.
    42  
    43      Trailing backslashes \
    44      are preserved
    45      """
    46      var = """
    47    This is not a docstring, 
    48    should not be modified. 
    49    """
    50  
    51  def bbb():
    52      """
    53      Docstring for top-level def statements
    54  are also fixed.
    55  
    56        “Unicode” characters aren't escaped.
    57  
    58      Trailing backslashes \
    59      are preserved
    60      """
    61      var = """
    62          This is not a docstring, 
    63          should not be modified. 
    64          """