File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,8 @@ def format_node_block_docstrings(lines: list) -> None:
593593 insert_herald = True
594594 nevermore = False
595595 for i , line in enumerate (lines ):
596+ if re .match (r"\s*{['\"]outputs['\"]:" , line ):
597+ nevermore = True
596598 if nevermore and not line .strip ():
597599 indent = 0
598600 if line .lstrip ().startswith ("Node Block:" ):
@@ -604,12 +606,11 @@ def format_node_block_docstrings(lines: list) -> None:
604606 insert_at = i
605607 indent = 3
606608 lines [i ] = f'{ " " * indent } { line } '
607- if re .match (r"\s*{['\"]outputs['\"]:" , line ):
608- nevermore = True
609609 if insert_at is not None :
610610 lines .insert (insert_at , '' )
611611 lines .insert (insert_at , ".. code-block:: Python" )
612612 if insert_herald :
613+ lines .insert (insert_at , '' )
613614 lines .insert (insert_at , "Node Block:" )
614615 print ('\n ' .join ([f'|{ line } |' for line in lines ]))
615616
You can’t perform that action at this time.
0 commit comments