mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-20 22:38:10 +00:00
fix(Codemod): restored original docstring replacement
This commit is contained in:
@@ -22,7 +22,7 @@ class ReplaceFunctionCommand(VisitorBasedCodemodCommand):
|
|||||||
|
|
||||||
def leave_FunctionDef(self, original_node: cst.FunctionDef, updated_node: cst.FunctionDef) -> cst.FunctionDef:
|
def leave_FunctionDef(self, original_node: cst.FunctionDef, updated_node: cst.FunctionDef) -> cst.FunctionDef:
|
||||||
functions_docstring = updated_node.get_docstring()
|
functions_docstring = updated_node.get_docstring()
|
||||||
docstring_should_be = ''
|
docstring_should_be = '"""No docstring here yet."""'
|
||||||
if functions_docstring is not None:
|
if functions_docstring is not None:
|
||||||
docstring_should_be = '"""\n{}\n\n"""'.format(functions_docstring)
|
docstring_should_be = '"""\n{}\n\n"""'.format(functions_docstring)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user