diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py index 7c46f3287f..0a134e775f 100644 --- a/docs/_ext/djangodocs.py +++ b/docs/_ext/djangodocs.py @@ -236,11 +236,13 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): self.compact_p = self.context.pop() self.body.append('\n') - # ? Really? def visit_desc_parameterlist(self, node): - self.body.append('(') + self.body.append('(') # by default sphinx puts around the "(" self.first_param = 1 + self.optional_param_level = 0 self.param_separator = node.child_text_separator + self.required_params_left = sum([isinstance(c, addnodes.desc_parameter) + for c in node.children]) def depart_desc_parameterlist(self, node): self.body.append(')')