Commit 83de842a authored by Stefan Behnel's avatar Stefan Behnel

rename "jedi-typer.py" script to "jedityper.py" to make it importable (which...

rename "jedi-typer.py" script to "jedityper.py" to make it importable (which might become interesting at some point)
parent e1f739f5
...@@ -32,14 +32,14 @@ def _tempfile(code): ...@@ -32,14 +32,14 @@ def _tempfile(code):
def _test_typing(code, inject=False): def _test_typing(code, inject=False):
sys.path.insert(0, TOOLS_DIR) sys.path.insert(0, TOOLS_DIR)
try: try:
module = __import__('jedi-typer') import jedityper
finally: finally:
sys.path.remove(TOOLS_DIR) sys.path.remove(TOOLS_DIR)
lines = [] lines = []
with _tempfile(code) as f: with _tempfile(code) as f:
types = module.analyse(f.name) types = jedityper.analyse(f.name)
if inject: if inject:
lines = module.inject_types(f.name, types) lines = jedityper.inject_types(f.name, types)
return types, lines return types, lines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment