From a9efa3db33ae357e84eacd560137d3b212c3cff7 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 14 Jan 2014 00:02:09 +0100 Subject: [PATCH] make utils feel more pythonic --- jedi/utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jedi/utils.py b/jedi/utils.py index 9b04bde8..0b4af096 100644 --- a/jedi/utils.py +++ b/jedi/utils.py @@ -6,6 +6,8 @@ from __future__ import absolute_import import __main__ from collections import namedtuple import re +import os +import sys from jedi import Interpreter @@ -34,15 +36,15 @@ def setup_readline(namespace_module=__main__): This will fallback to the readline completer if Jedi is not installed. The readline completer will only complete names in the global namespace, - so for example, + so for example:: - >>> ran # doctest: +SKIP + ran will complete to ``range`` - with both Jedi and readline, but + with both Jedi and readline, but:: - >>> range(10).cou # doctest: +SKIP + range(10).cou will show complete to ``range(10).count`` only with Jedi. @@ -63,7 +65,6 @@ def setup_readline(namespace_module=__main__): library module. """ if state == 0: - import os, sys sys.path.insert(0, os.getcwd()) # Calling python doesn't have a path, so add to sys.path. try: