mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-19 12:01:12 +08:00
import stuff in __init__.py
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
from api import *
|
from .api import Script, NotFoundError, set_debug_function
|
||||||
import settings
|
from . import settings
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
__all__ = ['Script', 'NotFoundError', 'set_debug_function']
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
@@ -13,8 +15,6 @@ import helpers
|
|||||||
|
|
||||||
from _compatibility import next
|
from _compatibility import next
|
||||||
|
|
||||||
__all__ = ['Script', 'NotFoundError', 'set_debug_function']
|
|
||||||
|
|
||||||
|
|
||||||
class NotFoundError(Exception):
|
class NotFoundError(Exception):
|
||||||
""" A custom error to avoid catching the wrong exceptions """
|
""" A custom error to avoid catching the wrong exceptions """
|
||||||
@@ -39,7 +39,8 @@ class Completion(object):
|
|||||||
append = '('
|
append = '('
|
||||||
|
|
||||||
if settings.add_dot_after_module:
|
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):
|
if isinstance(self.base, parsing.Param):
|
||||||
append += '='
|
append += '='
|
||||||
return dot + self.name.names[-1][self.like_name_length:] + append
|
return dot + self.name.names[-1][self.like_name_length:] + append
|
||||||
@@ -147,7 +148,6 @@ class CallDef(object):
|
|||||||
def module(self):
|
def module(self):
|
||||||
return self.executable.get_parent_until()
|
return self.executable.get_parent_until()
|
||||||
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<%s: %s index %s>' % (self.__class__.__name__, self.executable,
|
return '<%s: %s index %s>' % (self.__class__.__name__, self.executable,
|
||||||
self.index)
|
self.index)
|
||||||
|
|||||||
Reference in New Issue
Block a user