chore(common): expose yields as a property.
: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
returnsormain_returns, so it will not break anything on clients side, clients who are depending onreturnsto get the same result asyieldswhen theYieldssection is the only section present, do not need to do any change, and still can usereturnsfor 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.
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.
@OmarAlJarrah