Closed jamesbraza closed 1 year ago
This is the same as the issue in #156 where the blank line is removed when there is a comment following the last line in a code block. Closing as a duplicate to #156.
Okay sounds good, didn't know they were the same issue.
@weibullguy one thing to note, is changing the variable name in the first line from default
to something like ham
, the issue goes away:
def foo():
ham = 0 # Comment
def bar():
pass
docformatter
seems to be matching the variable name, if that helps
@jamesbraza Thanks for the additional information. It's weird behavior for sure :confused: But all the information I can get is helpful.
@jamesbraza tag v1.6.1-rc1 should have the fix you need if you're interested in giving it a try before I officially release v1.6.1.
I wasn't sure how to pip install
the v1.6.1-rc1, I tried pip install --pre
and got nothing. I went ahead git clone
'd the repo, and confirmed that this issue is resolved with the current master
commit f1b0fa688a.
Nice job, thank you! ✅
Pretty niche bug here,
docformatter
is formatting outside of the docstring:Running
docformatter==1.5.1
on this: