elpy icon indicating copy to clipboard operation
elpy copied to clipboard

rewrite dostring folding

Open drdv opened this issue 5 years ago • 3 comments

PR Summary

Following #1774 and the modifications proposed in #1776, an alternative structure of the docstring folding code is suggested. The new implementation handles:

  • module-level docstrings
  • class docstrings
  • docstrings with both " and ' delimiters
  • comments (containing " and ') between function signature and its docstring

For each toggling, the function python-info-docstring-p is used only once. Two new unit tests have been added.

This PR was originally submitted at galaunay#6 (and later on moved here).

PR checklist

Please make sure that the following things have been addressed (and check the relevant checkboxes):

  • [x] Commits respect our guidelines
  • [x] Tests are passing properly (see here on how to run Elpy's tests)

For new features only:

  • [x] Tests has been added to cover the change
  • [ ] The documentation has been updated

drdv avatar Jun 07 '20 12:06 drdv

Coverage Status

Coverage decreased (-3.2%) to 88.671% when pulling 22ef41257687f164474ff848b79413acfdf310f1 on drdv:even-better-docstring-folding into fa58b0b6602252d7318cc6d96317c4b5c54abbca on jorgenschaefer:master.

coveralls avatar Sep 27 '20 16:09 coveralls

Coverage Status

Coverage remained the same at 91.843% when pulling 22ef41257687f164474ff848b79413acfdf310f1 on drdv:even-better-docstring-folding into fa58b0b6602252d7318cc6d96317c4b5c54abbca on jorgenschaefer:master.

coveralls avatar Sep 27 '20 16:09 coveralls

Sorry for taking so long to have a look at this. Could I ask you to rebase on the current master branch ? (This should run the automated tests, which can help)

galaunay avatar Mar 28 '21 19:03 galaunay