Skip to content
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 11 commits into from
Oct 30, 2023
Merged

Conversation

dandhlee
Copy link
Collaborator

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.

  • Tests pass

@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Aug 22, 2023
@dandhlee dandhlee mentioned this pull request Aug 22, 2023
1 task
@product-auto-label 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
@dandhlee dandhlee marked this pull request as ready for review October 30, 2023 15:05
@dandhlee dandhlee requested review from a team as code owners October 30, 2023 15:05
@dandhlee dandhlee requested a review from tbpg October 30, 2023 15:05
Comment on lines 851 to 853
# inspect.getargspec method will return wrong defaults
# which contain object address for some default values,
# like sys.stdout.
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the docstring!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants