Skip to content

Commit 3a5152f

Browse files
authored
Merge branch 'main' into pythongh-129149
2 parents ff57cf7 + 0ef8d47 commit 3a5152f

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

Doc/tools/extensions/pyspecific.py

-28
Original file line numberDiff line numberDiff line change
@@ -90,32 +90,6 @@ def run(self):
9090
return [pnode]
9191

9292

93-
# Support for documenting decorators
94-
95-
class PyDecoratorMixin(object):
96-
def handle_signature(self, sig, signode):
97-
ret = super(PyDecoratorMixin, self).handle_signature(sig, signode)
98-
signode.insert(0, addnodes.desc_addname('@', '@'))
99-
return ret
100-
101-
def needs_arglist(self):
102-
return False
103-
104-
105-
class PyDecoratorFunction(PyDecoratorMixin, PyFunction):
106-
def run(self):
107-
# a decorator function is a function after all
108-
self.name = 'py:function'
109-
return PyFunction.run(self)
110-
111-
112-
# TODO: Use sphinx.domains.python.PyDecoratorMethod when possible
113-
class PyDecoratorMethod(PyDecoratorMixin, PyMethod):
114-
def run(self):
115-
self.name = 'py:method'
116-
return PyMethod.run(self)
117-
118-
11993
class PyCoroutineMixin(object):
12094
def handle_signature(self, sig, signode):
12195
ret = super(PyCoroutineMixin, self).handle_signature(sig, signode)
@@ -289,8 +263,6 @@ def setup(app):
289263
app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
290264
app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
291265
app.add_object_type('monitoring-event', 'monitoring-event', '%s (monitoring event)', parse_monitoring_event)
292-
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
293-
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
294266
app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction)
295267
app.add_directive_to_domain('py', 'coroutinemethod', PyCoroutineMethod)
296268
app.add_directive_to_domain('py', 'awaitablefunction', PyAwaitableFunction)

0 commit comments

Comments
 (0)