summaryrefslogtreecommitdiff
path: root/sphinx/domains/python.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-07-12 20:50:15 +0900
committershimizukawa <shimizukawa@gmail.com>2014-07-12 20:50:15 +0900
commit02357d54bcd6a3e1f60d88474248fcdc29ba0459 (patch)
tree34f516f1e74272fd2cce7cee007d1bb13bc26288 /sphinx/domains/python.py
parent9f4116685768a8b9bdd3b6fd7009affe7d471ac0 (diff)
downloadsphinx-02357d54bcd6a3e1f60d88474248fcdc29ba0459.tar.gz
* Fix: py:function directive generate incorrectly signature when specifying a default parameter with an empty list `[]`. Closes #1503
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r--sphinx/domains/python.py2
1 files changed, 1 insertions, 1 deletions
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('['):