diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 210749062..d9b5dcac2 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -293,7 +293,7 @@ class Autosummary(Directive): def mangle_signature(sig, max_chars=30): """Reformat a function signature to a more compact form.""" sig = re.sub(r"^\((.*)\)$", r"\1", sig) + ", " - r = re.compile(r"(?P[a-zA_Z0-9_*]+)(?P=.*?)?, ") + r = re.compile(r"(?P[a-zA-Z0-9_*]+)(?P=.*?)?, ") items = r.findall(sig) args = []