Browse Source

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

The source code should be truncated after the start position, not a character from the start position.
tags/v0.5.0-beta
ggpolar 5 years ago
parent
commit
79e1b068ee
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