Browse Source

!330 Fix issue that the python source for an AST is wrong.

Merge pull request !330 from ggpolar/br_wzk_dev
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
edb7f7a0e4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindinsight/mindconverter/ast_edits.py

+ 1
- 1
mindinsight/mindconverter/ast_edits.py View File

@@ -297,7 +297,7 @@ class AstEditVisitor(ast.NodeVisitor):
if source_prefix: if source_prefix:
pos = len(source_prefix) pos = len(source_prefix)
source_code = pasta.dump(node) source_code = pasta.dump(node)
return source_code[pos]
return source_code[pos:]


def _replace_external_reference(self): def _replace_external_reference(self):
""" """


Loading…
Cancel
Save