Revision eb62069e lib/build/sphinx_ext.py
b/lib/build/sphinx_ext.py | ||
---|---|---|
44 | 44 |
import ganeti.rapi.rlib2 # pylint: disable-msg=W0611 |
45 | 45 |
|
46 | 46 |
|
47 |
COMMON_PARAM_NAMES = map(operator.itemgetter(0), opcodes.OpCode.OP_PARAMS)
|
|
47 |
COMMON_PARAM_NAMES = map(compat.fst, opcodes.OpCode.OP_PARAMS)
|
|
48 | 48 |
|
49 | 49 |
#: Namespace for evaluating expressions |
50 | 50 |
EVAL_NS = dict(compat=compat, constants=constants, utils=utils, errors=errors, |
... | ... | |
98 | 98 |
params_with_alias = \ |
99 | 99 |
utils.NiceSort([(alias.get(name, name), name, default, test, doc) |
100 | 100 |
for (name, default, test, doc) in op_cls.GetAllParams()], |
101 |
key=operator.itemgetter(0))
|
|
101 |
key=compat.fst)
|
|
102 | 102 |
|
103 | 103 |
for (rapi_name, name, default, test, doc) in params_with_alias: |
104 | 104 |
# Hide common parameters if not explicitely included |
... | ... | |
227 | 227 |
|
228 | 228 |
""" |
229 | 229 |
for (_, (fdef, _, _, _)) in utils.NiceSort(fields.items(), |
230 |
key=operator.itemgetter(0)):
|
|
230 |
key=compat.fst):
|
|
231 | 231 |
assert len(fdef.doc.splitlines()) == 1 |
232 | 232 |
yield "``%s``" % fdef.name |
233 | 233 |
yield " %s" % fdef.doc |
Also available in: Unified diff