docstring_parser icon indicating copy to clipboard operation
docstring_parser copied to clipboard

chore(common): expose yields as a property.

Open OmarAlJarrah opened this issue 2 years ago • 2 comments

:link: Related Issues

  • https://github.com/rr-/docstring_parser/issues/78

🎶 Notes

  • I have extended the code by exposing one more property, and not touch the already existing returns or main_returns, so it will not break anything on clients side, clients who are depending on returns to get the same result as yields when the Yields section is the only section present, do not need to do any change, and still can use returns for that purpose.

  • In case more tests for other docstring formats are believed to be required, I will go on and implement them, though I think the current tests are enough.

OmarAlJarrah avatar Jun 30 '23 23:06 OmarAlJarrah

The code looks OK; the chore commit message style is incompatible with what we currently have. The tests should really be separate functions rather than assertions interleaved with actual code (even if this deviates from the current practice); then they could be grouped inside a class for readability. Both of these points aren't as important as the CI failing, but that's due to unrelated problems that I tracked in the issue #80. LMK if you wish to do any follow-up changes, or prefer to merge as-is.

rr- avatar Jul 01 '23 07:07 rr-

@OmarAlJarrah

rr- avatar Jul 08 '23 18:07 rr-