-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docformatter
which formats Python docstrings to PEP 257
#267
Add docformatter
which formats Python docstrings to PEP 257
#267
Conversation
docformatter
which formats Python docstrings to PEP 257
5ff063f
to
9920042
Compare
f6d7259
to
89ea943
Compare
For some reason no other built-in formatters use `file`, all use `filepath`. So maybe this is better? Even though I don't need stdin. And I have a loose hope this might fix the tests.
I have possible implementations of a docformatter wrapper script and both work interactively but fail the tests. I think I need some help. maybe @raxod502 has some idea? Implementation 1: Using
|
It seems simpler to go with in-place in this case, and the feature is supported for a reason. Let me have a look and see if I can fix the issue with the test framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
Thanks for fixing and merging this! I was positively surprised that this package even has a dockerized testing framework in the first place, I have contributed to enough packages with no unit tests and have no personal experience with doing them in Elisp. |
Add docformatter for Python docstrings.
By default it outputs diffs but changes in-place with
--in-place
. On successful change it exits with an error code of3
(found out by trial), so I had to add a formatter wrapping-script.Initially I used
--in-place
with the specialin-place
symbol in apheleia. But now I tried an approach where I transform the diff into usable stdout usingpatch
instead.Related to #266 , where I had used the example of docformatter to ask how to add scripts with positive exit codes and @raxod502 showed me the
phpcs
solution.