File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -579,6 +579,9 @@ def generate_function_stub(
579
579
if not isinstance (docstring , str ):
580
580
docstring = None
581
581
582
+ if docstring :
583
+ docstring = self ._indent_docstring (docstring )
584
+
582
585
ctx = FunctionContext (
583
586
self .module_name ,
584
587
name ,
@@ -612,11 +615,7 @@ def generate_function_stub(
612
615
if inferred [0 ].args and inferred [0 ].args [0 ].name == "cls" :
613
616
decorators .append ("@classmethod" )
614
617
615
- output .extend (
616
- self .format_func_def (
617
- inferred , decorators = decorators , docstring = self ._indent_docstring (docstring )
618
- )
619
- )
618
+ output .extend (self .format_func_def (inferred , decorators = decorators , docstring = docstring ))
620
619
self ._fix_iter (ctx , inferred , output )
621
620
622
621
def _indent_docstring (self , docstring : str ) -> str :
You can’t perform that action at this time.
0 commit comments