Fix wrong imports

- "from _compatibility import ..." (not in circular imports)
- "from jedi import builtin" (one of circular imports)
- "api_classes = api.api_classes"
  ("from jedi import api_classes" is not supported)
This commit is contained in:
Takafumi Arakaki
2013-03-16 21:03:34 +01:00
parent 07ba6658dd
commit f5fee5f0df
6 changed files with 6 additions and 7 deletions

View File

@@ -68,11 +68,11 @@ backtracking algorithm.
.. todo:: nonlocal statement, needed or can be ignored? (py3k) .. todo:: nonlocal statement, needed or can be ignored? (py3k)
""" """
from _compatibility import next, hasattr, is_py3k, unicode, reraise
import sys import sys
import itertools import itertools
from jedi._compatibility import next, hasattr, is_py3k, unicode, reraise
from jedi import common from jedi import common
from jedi import cache from jedi import cache
from jedi import parsing_representation as pr from jedi import parsing_representation as pr

View File

@@ -12,7 +12,7 @@ they change classes in Python 3.
import copy import copy
import itertools import itertools
from _compatibility import property, use_metaclass, next, hasattr from jedi._compatibility import property, use_metaclass, next, hasattr
from jedi import parsing_representation as pr from jedi import parsing_representation as pr
from jedi import cache from jedi import cache
from jedi import helpers from jedi import helpers

View File

@@ -2,7 +2,7 @@ import pydoc
import keyword import keyword
from jedi._compatibility import is_py3k from jedi._compatibility import is_py3k
from jedi import builtin import builtin
try: try:
from pydoc_data import topics as pydoc_topics from pydoc_data import topics as pydoc_topics

View File

@@ -15,13 +15,12 @@ Apart from those classes there's a ``sys.path`` fetching function, as well as
""" """
from __future__ import with_statement from __future__ import with_statement
from _compatibility import exec_function, unicode, is_py25, literal_eval
import re import re
import tokenize import tokenize
import sys import sys
import os import os
from jedi._compatibility import exec_function, unicode, is_py25, literal_eval
from jedi import cache from jedi import cache
from jedi import parsing from jedi import parsing
from jedi import parsing_representation as pr from jedi import parsing_representation as pr

View File

@@ -15,11 +15,11 @@ within the statement. This lowers memory usage and cpu time and reduces the
complexity of the ``Parser`` (there's another parser sitting inside complexity of the ``Parser`` (there's another parser sitting inside
``Statement``, which produces ``Array`` and ``Call``). ``Statement``, which produces ``Array`` and ``Call``).
""" """
from _compatibility import next, StringIO
import tokenize import tokenize
import keyword import keyword
from jedi._compatibility import next, StringIO
from jedi import debug from jedi import debug
from jedi import common from jedi import common
from jedi import parsing_representation as pr from jedi import parsing_representation as pr

View File

@@ -18,7 +18,7 @@ from .base import TestBase, unittest, cwd_at
import jedi import jedi
from jedi._compatibility import is_py25, utf8, unicode from jedi._compatibility import is_py25, utf8, unicode
from jedi import api from jedi import api
from jedi import api_classes api_classes = api.api_classes
#jedi.set_debug_function(jedi.debug.print_to_stdout) #jedi.set_debug_function(jedi.debug.print_to_stdout)