ansys / ansys/pyconverter-xml2py

Empty lines at the end of a docstring are not allowed on Numpydoc

Open
#450 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Empty lines at the end of a docstring are not allowed on Numpydoc

For instance this docstring:

```py
def my_func() -> str:
"""This is a function.

Returns
-------
str
A greeting message.

Notes
-----
**The next line should not be empty nor exist.**

"""
return "Hello"
```

Because of [GL02](https://dokk.org/documentation/numpydoc/v1.4.0/validation/#built-in-validation-checks)

Contributor guide

Open the contributing guide

Research direction

Start by tracing where the converter generates Python docstrings from XML documentation, then reproduce the example in the issue and compare it with Numpydoc's GL02 requirement. Done means generated docstrings no longer contain the forbidden empty line at the end of the section, with a regression check for the shown case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.