mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 23:16:31 +00:00
Don't apply sphinx paramlinks to Callable[] lines
This commit is contained in:
@@ -82,9 +82,10 @@ def autodoc_process_docstring(app, what, name, obj, options, lines):
|
||||
modifier, objname, paramname = m.group(1) or '', name, m.group(2)
|
||||
return ":type %s_sphinx_paramlinks_%s.%s:" % (
|
||||
modifier, objname, paramname)
|
||||
|
||||
line = re.sub(r'^:param ([^:]+? )?([^:]+?):', cvt, line)
|
||||
line = re.sub(r'^:type ([^:]+? )?([^:]+?):', secondary_cvt, line)
|
||||
|
||||
if 'Callable' not in line:
|
||||
line = re.sub(r'^:param ([^:]+? )?([^:]+?):', cvt, line)
|
||||
line = re.sub(r'^:type ([^:]+? )?([^:]+?):', secondary_cvt, line)
|
||||
return line
|
||||
|
||||
if what in ('function', 'method', 'class'):
|
||||
|
||||
Reference in New Issue
Block a user