Commit e170ed27 authored by Victor Stinner's avatar Victor Stinner

asyncio doc: fix the sphinx extension for coroutine commands

parent 4088ad9d
...@@ -148,17 +148,12 @@ class PyDecoratorMethod(PyDecoratorMixin, PyClassmember): ...@@ -148,17 +148,12 @@ class PyDecoratorMethod(PyDecoratorMixin, PyClassmember):
class PyCoroutineMixin(object): class PyCoroutineMixin(object):
def handle_signature(self, sig, signode): def handle_signature(self, sig, signode):
ret = super(PyCoroutineMixin, self).handle_signature(sig, signode) ret = super(PyCoroutineMixin, self).handle_signature(sig, signode)
# signode.insert(0, addnodes.desc_addname('coroutine ', 'coroutine '))
signode.insert(0, addnodes.desc_annotation('coroutine ', 'coroutine ')) signode.insert(0, addnodes.desc_annotation('coroutine ', 'coroutine '))
return ret return ret
def needs_arglist(self):
return False
class PyCoroutineFunction(PyCoroutineMixin, PyModulelevel): class PyCoroutineFunction(PyCoroutineMixin, PyModulelevel):
def run(self): def run(self):
# a decorator function is a function after all
self.name = 'py:function' self.name = 'py:function'
return PyModulelevel.run(self) return PyModulelevel.run(self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment