Skip to content

Commit 5c322ad

Browse files
Silence spurious warning on autosummary config
1 parent 0479bd4 commit 5c322ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sphinx_automodapi/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def find_autosummary_in_lines_for_automodsumm(lines, module=None, filename=None)
134134
inherited_members_arg_re = re.compile(r'^\s+:inherited-members:\s*$')
135135
no_inherited_members_arg_re = re.compile(r'^\s+:no-inherited-members:\s*$')
136136
noindex_arg_re = re.compile(r'^\s+:noindex:\s*$')
137+
other_options_re = re.compile(r'^\s+:nosignatures:\s*$')
137138

138139
documented = []
139140

@@ -176,8 +177,10 @@ def find_autosummary_in_lines_for_automodsumm(lines, module=None, filename=None)
176177
continue
177178

178179
if line.strip().startswith(':'):
179-
warn(line)
180-
continue # skip options
180+
if other_options_re.match(line):
181+
continue # skip known options
182+
else:
183+
warn(line) # warn about unknown options
181184

182185
m = autosummary_item_re.match(line)
183186
if m:

0 commit comments

Comments
 (0)