@@ -92,30 +92,6 @@ def run(self):
9292
9393# Support for documenting decorators
9494
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-
11995class PyCoroutineMixin (object ):
12096 def handle_signature (self , sig , signode ):
12197 ret = super (PyCoroutineMixin , self ).handle_signature (sig , signode )
@@ -289,8 +265,6 @@ def setup(app):
289265 app .add_object_type ('opcode' , 'opcode' , '%s (opcode)' , parse_opcode_signature )
290266 app .add_object_type ('pdbcommand' , 'pdbcmd' , '%s (pdb command)' , parse_pdb_command )
291267 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 )
294268 app .add_directive_to_domain ('py' , 'coroutinefunction' , PyCoroutineFunction )
295269 app .add_directive_to_domain ('py' , 'coroutinemethod' , PyCoroutineMethod )
296270 app .add_directive_to_domain ('py' , 'awaitablefunction' , PyAwaitableFunction )
0 commit comments