chore: Format docstrings to adhere to PEP 257 guidelines#4
Merged
sumansaurabh merged 1 commit intomainfrom May 24, 2024
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes changes to the
CONTRIBUTION.mdguidelines, as well as updates to thePyDocSmithlibrary to improve the formatting of docstrings. The changes inPyDocSmithinclude the addition of a new function to format docstrings according to PEP 257, and updates to thecomposefunction to use this new formatting function. The changes also include updates to the tests to verify the new functionality.Updates to contribution guidelines:
CONTRIBUTION.md: Added guidelines for reporting issues, submitting changes, code of conduct, writing poetry, and review process.Improvements to docstring formatting:
PyDocSmith/common.py: Addedtextwrapmodule for text wrapping, updated themetaattribute in theDocstringclass to use type hinting, and added a new functionformat_docstring_to_pep257to format docstrings according to PEP 257. [1] [2] [3]PyDocSmith/parser.py: Imported theformat_docstring_to_pep257function, added aline_widthparameter to thecomposefunction, and updated thecomposefunction to use theformat_docstring_to_pep257function whenline_widthis greater than or equal to 72. [1] [2] [3]Updates to tests:
PyDocSmith/tests/test_google.py: Imported theformat_docstring_to_pep257function, added a new testtest_very_long_content_for_format_docstring_to_pep257to verify the new formatting function, and updated thetest_unformatted_valid_docstringtest to use thecomposefunction. [1] [2] [3]