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

Silence spurious warning on autosummary config #158

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions sphinx_automodapi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def find_autosummary_in_lines_for_automodsumm(lines, module=None, filename=None)
inherited_members_arg_re = re.compile(r'^\s+:inherited-members:\s*$')
no_inherited_members_arg_re = re.compile(r'^\s+:no-inherited-members:\s*$')
noindex_arg_re = re.compile(r'^\s+:noindex:\s*$')
other_options_re = re.compile(r'^\s+:nosignatures:\s*$')

documented = []

Expand Down Expand Up @@ -176,8 +177,10 @@ def find_autosummary_in_lines_for_automodsumm(lines, module=None, filename=None)
continue

if line.strip().startswith(':'):
warn(line)
continue # skip options
if other_options_re.match(line):
continue # skip known options
else:
warn(line) # warn about unknown options

m = autosummary_item_re.match(line)
if m:
Expand Down