diff --git a/jedi/__init__.py b/jedi/__init__.py index cddf7860..c07d6eeb 100644 --- a/jedi/__init__.py +++ b/jedi/__init__.py @@ -1,2 +1,2 @@ -from api import * -import settings +from .api import Script, NotFoundError, set_debug_function +from . import settings diff --git a/jedi/api.py b/jedi/api.py index 196916c5..295c1cd5 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -1,3 +1,5 @@ +__all__ = ['Script', 'NotFoundError', 'set_debug_function'] + import re import weakref @@ -13,8 +15,6 @@ import helpers from _compatibility import next -__all__ = ['Script', 'NotFoundError', 'set_debug_function'] - class NotFoundError(Exception): """ A custom error to avoid catching the wrong exceptions """ @@ -39,7 +39,8 @@ class Completion(object): append = '(' if settings.add_dot_after_module: - if isinstance(self.base, parsing.Module): append += '.' + if isinstance(self.base, parsing.Module): + append += '.' if isinstance(self.base, parsing.Param): append += '=' return dot + self.name.names[-1][self.like_name_length:] + append @@ -147,7 +148,6 @@ class CallDef(object): def module(self): return self.executable.get_parent_until() - def __repr__(self): return '<%s: %s index %s>' % (self.__class__.__name__, self.executable, self.index)