<s> from . function_doc import FunctionDoc <EOL> from . class_doc import ClassDoc <EOL> def refactor_docstring ( app , what , name , obj , options , lines ) : <EOL> refactor = None <EOL> if ( '<STR_LIT:class>' in what ) : <EOL> refactor = ClassDoc ( lines ) <EOL> elif ( '<STR_LIT>' in what ) or ( '<STR_LIT>' in what ) : <EOL> refactor = FunctionDoc ( lines ) <EOL> if refactor is not None : <EOL> refactor . parse ( ) <EOL> def setup ( app ) : <EOL> app . setup_extension ( '<STR_LIT>' ) <EOL> app . connect ( '<STR_LIT>' , refactor_docstring ) </s>
