Fix some stuff in a diff profile test script.

This commit is contained in:
Dave Halter
2017-03-16 21:45:51 +01:00
parent 8156a6b8a2
commit ce41119051

View File

@@ -9,15 +9,15 @@ Usage:
Options:
-h --help Show this screen.
-d --debug Enable Jedi internal debugging.
-s <sort> Sort the profile results, e.g. cum, name [default: time].
-s <sort> Sort the profile results, e.g. cumtime, name [default: time].
"""
import cProfile
from docopt import docopt
from jedi.parser import load_grammar
from jedi.parser.python import load_grammar
from jedi.parser.diff import DiffParser
from jedi.parser import ParserWithRecovery
from jedi.parser.python import ParserWithRecovery
from jedi._compatibility import u
from jedi.common import splitlines
import jedi
@@ -29,7 +29,9 @@ def run(parser, lines):
def main(args):
jedi.set_debug_function(notices=args['--debug'])
if args['--debug']:
jedi.set_debug_function(notices=True)
with open(args['<file>']) as f:
code = f.read()
grammar = load_grammar()