@@ -90,32 +90,6 @@ def run(self):
90
90
return [pnode ]
91
91
92
92
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
-
119
93
class PyCoroutineMixin (object ):
120
94
def handle_signature (self , sig , signode ):
121
95
ret = super (PyCoroutineMixin , self ).handle_signature (sig , signode )
@@ -289,8 +263,6 @@ def setup(app):
289
263
app .add_object_type ('opcode' , 'opcode' , '%s (opcode)' , parse_opcode_signature )
290
264
app .add_object_type ('pdbcommand' , 'pdbcmd' , '%s (pdb command)' , parse_pdb_command )
291
265
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 )
294
266
app .add_directive_to_domain ('py' , 'coroutinefunction' , PyCoroutineFunction )
295
267
app .add_directive_to_domain ('py' , 'coroutinemethod' , PyCoroutineMethod )
296
268
app .add_directive_to_domain ('py' , 'awaitablefunction' , PyAwaitableFunction )
0 commit comments