Commit b20a8ec1 authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: fix doxygen to epydoc comment conversion

parent 47648bd4
...@@ -454,8 +454,8 @@ def parse_override(name): ...@@ -454,8 +454,8 @@ def parse_override(name):
def fix_python_comment(c): def fix_python_comment(c):
"""Fix comment by removing first and last parameters (self and exception) """Fix comment by removing first and last parameters (self and exception)
""" """
data=c.splitlines() data=c.replace('@{', '').replace('@see', 'See').splitlines()
body=itertools.takewhile(lambda l: not '@param' in l, data) body=itertools.takewhile(lambda l: not '@param' in l and not '@return' in l, data)
param=[ python_param_re.sub('\\1:\\2', l) for l in itertools.ifilter(lambda l: '@param' in l, data) ] param=[ python_param_re.sub('\\1:\\2', l) for l in itertools.ifilter(lambda l: '@param' in l, data) ]
ret=[ l.replace('@return', '@return:') for l in itertools.ifilter(lambda l: '@return' in l, data) ] ret=[ l.replace('@return', '@return:') for l in itertools.ifilter(lambda l: '@return' in l, data) ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment