-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: support docstrings without type added #311
Merged
Merged
Conversation
This file contains 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
1 task
2 tasks
product-auto-label
bot
added
size: m
Pull request size is medium.
and removed
size: l
Pull request size is large.
labels
Oct 29, 2023
tbpg
approved these changes
Oct 30, 2023
docfx_yaml/extension.py
Outdated
Comment on lines
851
to
853
# inspect.getargspec method will return wrong defaults | ||
# which contain object address for some default values, | ||
# like sys.stdout. |
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.
I feel like there is a missing period or "The" or something here. I don't understand this comment.
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.
Updated the docstring!
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Oct 30, 2023
🤖 I have created a release *beep* *boop* --- ## [2.0.6](https://github.com/googleapis/sphinx-docfx-yaml/compare/v2.0.5...v2.0.6) (2023-10-30) ### Bug Fixes * Refactor type hint retrieval ([#312](https://github.com/googleapis/sphinx-docfx-yaml/issues/312)) ([0c91f60](https://github.com/googleapis/sphinx-docfx-yaml/commit/0c91f60fb2eab8b184b1228d5f3eb133be7ae201)) * Support docstrings without type added ([#311](https://github.com/googleapis/sphinx-docfx-yaml/issues/311)) ([d214d64](https://github.com/googleapis/sphinx-docfx-yaml/commit/d214d64c54d06fa715535b14932ac1ad67fa0d09)) * Update annotation name extraction logic and add unit tests ([#320](https://github.com/googleapis/sphinx-docfx-yaml/issues/320)) ([220951d](https://github.com/googleapis/sphinx-docfx-yaml/commit/220951d341c27d345679f64fb67968320168e428)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Previously, GoogleDocstrings from Napoleon required that docstrings came with a type hint. However, docstrings in the updated Python style guide do not come with type hint and that should be supported.
Using the updated extract_type_name method, uses the default type hint if they're not found in the docstring. Also fixing
object at 0x
to be simpler to catch more cases.Fixes b/296938464.