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

improve section detection #327

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
also check that removing the blank line between sections works
  • Loading branch information
keewis committed May 24, 2021
commit 11a67c8ef6fd5f51b05547ccc5c3490bde6fc4a6
16 changes: 16 additions & 0 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
@@ -946,6 +946,22 @@ def test_missing_blank_line_after_summary():
assert doc["Parameters"][0].name == "data"


def test_missing_blank_line_between_sections():
doc = NumpyDocString("""
Parameters
----------
data
Some parameter.
Returns
-------
int
""")
assert len(doc["Parameters"]) == 1
assert doc["Parameters"][0].name == "data"

assert len(doc["Returns"]) == 1


def test_unicode():
doc = SphinxDocString("""
öäöäöäöäöåååå