Skip to content

Additional missing sections for Google-style docstrings#108

Open
BrianPugh wants to merge 2 commits intorr-:masterfrom
BrianPugh:additional-google-sections
Open

Additional missing sections for Google-style docstrings#108
BrianPugh wants to merge 2 commits intorr-:masterfrom
BrianPugh:additional-google-sections

Conversation

@BrianPugh
Copy link

Adds missing section types for Google docstrings; genereally speaking, both Google/Numpy docstring types should support all the same section types. Sphinx lists the valid section types here. Originally discovered by domdomegg here.

Additionally, i added a small tweak to pyproject.toml; pydoctor >= 25.4.0 is incompatible with python3.8, so I just added that limitation rather than dropping python3.8 support since it's only used for document building. Functionally nothing changes, dependency solving (e.g. with uv) was simply broken before.

Comment on lines +1100 to +1101
assert docstring.deprecation.version == "Use new_function instead."
assert docstring.deprecation.description is None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Description being None and version some text. This doesn't look like a correct behavior.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a parametrize case to the test_compose() test to make sure that a See Also: gets composed correctly.

Copy link
Collaborator

@mauvilsa mauvilsa left a comment

Choose a reason for hiding this comment

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

Overall looks fine. But the handling of version in deprecated is very weird. I don't think this behavior should be codified in the tests. How should the behavior be, I haven't thought about. Please think about it and make a proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants