Skip to content

Commit

Permalink
Merge pull request #158 from simaoafonso-pwt/patch-1
Browse files Browse the repository at this point in the history
Silence spurious warning on autosummary config
  • Loading branch information
saimn committed Feb 23, 2023
2 parents 0479bd4 + 5c322ad commit daa2a32
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit daa2a32

Please sign in to comment.