Skip to content

Commit

Permalink
add description __doc__ tests (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeffii authored Apr 19, 2017
1 parent 7674cb8 commit 34c7aa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/sv_extra_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def format_macro_item(k, v):
return '< ' + k.replace('_', ' ') + " | " + slice_docstring(v)

def slice_docstring(desc):
if not desc:
return ''
if '///' in desc:
desc = desc.strip().split('///')[0]
return desc
Expand All @@ -68,7 +70,7 @@ def ensure_valid_show_string(item):
def function_iterator(module_file):
for name in ddir(module_file):
obj = getattr(module_file, name)
if callable(obj):
if callable(obj) and obj.__doc__ and '///' in obj.__doc__:
yield name, obj.__doc__

def get_main_macro_module(fullpath):
Expand Down

0 comments on commit 34c7aa9

Please sign in to comment.