@@ -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-
11993class 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