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
importredbaronrb=redbaron.RedBaron(open('gendocstr/example2.py').read())
docstring="""Hello worldhow is it going?"""rb[0].value.insert(0, '"""%s"""'%docstring)
print(rb.dumps())
gives:
defindicator(r, threshold=42):
"""Hello world how is it going? """ifr>threshold:
returnFalseelse:
returnTrue
The line in the middle is also indented.
This causes linters to complain about trailing newlines.
As far as I can see, there is no way to control the automatic indentation.
This is with redbaron 0.9.2
The text was updated successfully, but these errors were encountered:
Adding a docstring adds indent, including on empty lines.
I am analysing and altering example.py:
with the following code
gives:
The line in the middle is also indented.
This causes linters to complain about trailing newlines.
As far as I can see, there is no way to control the automatic indentation.
This is with redbaron 0.9.2
The text was updated successfully, but these errors were encountered: