From 02357d54bcd6a3e1f60d88474248fcdc29ba0459 Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Sat, 12 Jul 2014 20:50:15 +0900 Subject: * Fix: py:function directive generate incorrectly signature when specifying a default parameter with an empty list `[]`. Closes #1503 --- sphinx/domains/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sphinx/domains/python.py') diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 8943198f..792cffd8 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -54,7 +54,7 @@ def _pseudo_parse_arglist(signode, arglist): while argument.startswith(']'): stack.pop() argument = argument[1:].strip() - while argument.endswith(']'): + while argument.endswith(']') and not argument.endswith('[]'): ends_close += 1 argument = argument[:-1].strip() while argument.endswith('['): -- cgit v1.2.1