summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-12-02 10:53:33 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-12-02 10:53:33 +0100
commit47a17eee2201e7c878ed75cd67c3fdae13dbe8e3 (patch)
tree45b126a827d64b4565c241935df3ca4a77074d84
parentfb64c733945e719d8b5d3f5e467cb0c0b01a0fb0 (diff)
downloadastroid-git-47a17eee2201e7c878ed75cd67c3fdae13dbe8e3.tar.gz
reduce circular imports I: import exceptions directly
- rename exceptions module: it's exported to Pylint anyway
-rw-r--r--__init__.py2
-rw-r--r--bases.py2
-rw-r--r--builder.py2
-rw-r--r--exceptions.py (renamed from _exceptions.py)0
-rw-r--r--inference.py4
-rw-r--r--inspector.py2
-rw-r--r--manager.py2
-rw-r--r--mixins.py3
-rw-r--r--node_classes.py2
-rw-r--r--protocols.py2
-rw-r--r--rebuilder.py2
-rw-r--r--scoped_nodes.py2
-rw-r--r--utils.py2
13 files changed, 14 insertions, 13 deletions
diff --git a/__init__.py b/__init__.py
index 840c53c6..62de81bb 100644
--- a/__init__.py
+++ b/__init__.py
@@ -60,7 +60,7 @@ __doctype__ = "restructuredtext en"
# WARNING: internal imports order matters !
# make all exception classes accessible from astng package
-from logilab.astng._exceptions import *
+from logilab.astng.exceptions import *
# make all node classes accessible from astng package
from logilab.astng.nodes import *
diff --git a/bases.py b/bases.py
index a908b8a9..6c33dee6 100644
--- a/bases.py
+++ b/bases.py
@@ -51,7 +51,7 @@ except ImportError:
pass
from logilab.common.compat import builtins
-from logilab.astng._exceptions import InferenceError, ASTNGError, \
+from logilab.astng.exceptions import InferenceError, ASTNGError, \
NotFoundError, UnresolvableName
from logilab.astng.as_string import as_string
diff --git a/builder.py b/builder.py
index 16b41be7..4e855b11 100644
--- a/builder.py
+++ b/builder.py
@@ -35,7 +35,7 @@ from inspect import isdatadescriptor
from logilab.common.modutils import modpath_from_file
-from logilab.astng._exceptions import ASTNGBuildingException, InferenceError
+from logilab.astng.exceptions import ASTNGBuildingException, InferenceError
from logilab.astng.raw_building import build_module, object_build_class, \
object_build_function, object_build_datadescriptor, attach_dummy_node, \
object_build_methoddescriptor, attach_const_node, attach_import_node
diff --git a/_exceptions.py b/exceptions.py
index 7dd6135e..7dd6135e 100644
--- a/_exceptions.py
+++ b/exceptions.py
diff --git a/inference.py b/inference.py
index 597d450a..def91a03 100644
--- a/inference.py
+++ b/inference.py
@@ -34,8 +34,8 @@ except NameError:
from logilab.astng import nodes, raw_building
from logilab.astng.manager import ASTNGManager
-from logilab.astng import ASTNGError, InferenceError, UnresolvableName, \
- NoDefault, NotFoundError, ASTNGBuildingException
+from logilab.astng.exceptions import (ASTNGBuildingException, ASTNGError,
+ InferenceError, NoDefault, NotFoundError, UnresolvableName)
from logilab.astng.bases import YES, Instance, InferenceContext, Generator, \
_infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered
from logilab.astng.protocols import _arguments_infer_argname
diff --git a/inspector.py b/inspector.py
index 181a3fa3..a4abd1f2 100644
--- a/inspector.py
+++ b/inspector.py
@@ -43,7 +43,7 @@ from logilab.common.modutils import get_module_part, is_relative, \
is_standard_module
from logilab import astng
-from logilab.astng import InferenceError
+from logilab.astng.exceptions import InferenceError
from logilab.astng.utils import LocalsVisitor
class IdGeneratorMixIn:
diff --git a/manager.py b/manager.py
index 836d0c23..c496f9ae 100644
--- a/manager.py
+++ b/manager.py
@@ -46,7 +46,7 @@ from logilab.common.modutils import NoSourceFile, is_python_source, \
get_module_files, get_source_file, zipimport
from logilab.common.configuration import OptionsProviderMixIn
-from logilab.astng._exceptions import ASTNGBuildingException
+from logilab.astng.exceptions import ASTNGBuildingException
def astng_wrapper(func, modname):
"""wrapper to give to ASTNGManager.project_from_files"""
diff --git a/mixins.py b/mixins.py
index 72899005..911c2e1a 100644
--- a/mixins.py
+++ b/mixins.py
@@ -33,7 +33,8 @@
"""
-from logilab.astng import ASTNGBuildingException, InferenceError, NotFoundError
+from logilab.astng.exceptions import (ASTNGBuildingException, InferenceError,
+ NotFoundError)
from logilab.astng.bases import BaseClass
# /!\ We cannot build a StmtNode(NodeNG) class since modifying "__bases__"
diff --git a/node_classes.py b/node_classes.py
index c41cba00..26cac7ac 100644
--- a/node_classes.py
+++ b/node_classes.py
@@ -22,7 +22,7 @@
import sys
-from logilab.astng import NoDefault
+from logilab.astng.exceptions import NoDefault
from logilab.astng.bases import NodeNG, BaseClass, Instance, copy_context, \
_infer_stmts, YES
from logilab.astng.mixins import StmtMixIn, BlockRangeMixIn, AssignTypeMixin, \
diff --git a/protocols.py b/protocols.py
index 301ef0fc..dba1834e 100644
--- a/protocols.py
+++ b/protocols.py
@@ -26,7 +26,7 @@ from __future__ import generators
__doctype__ = "restructuredtext en"
-from logilab.astng import InferenceError, NoDefault
+from logilab.astng.exceptions import InferenceError, NoDefault
from logilab.astng.node_classes import unpack_infer
from logilab.astng.bases import copy_context, \
raise_if_nothing_infered, yes_if_nothing_infered, Instance, Generator, YES
diff --git a/rebuilder.py b/rebuilder.py
index 2d89af9c..9330711c 100644
--- a/rebuilder.py
+++ b/rebuilder.py
@@ -46,7 +46,7 @@ from _ast import (Expr as Discard, Str,
Eq, Gt, GtE, In, Is, IsNot, Lt, LtE, NotEq, NotIn,
)
-from logilab.astng import ASTNGBuildingException
+from logilab.astng.exceptions import ASTNGBuildingException
from logilab.astng import nodes as new
diff --git a/scoped_nodes.py b/scoped_nodes.py
index 64057318..336f0b1c 100644
--- a/scoped_nodes.py
+++ b/scoped_nodes.py
@@ -32,7 +32,7 @@ from itertools import chain
from logilab.common.compat import builtins
from logilab.common.decorators import cached
-from logilab.astng import NotFoundError, NoDefault, \
+from logilab.astng.exceptions import NotFoundError, NoDefault, \
ASTNGBuildingException, InferenceError
from logilab.astng.node_classes import Const, DelName, DelAttr, \
Dict, From, List, Name, Pass, Raise, Return, Tuple, Yield, \
diff --git a/utils.py b/utils.py
index 41eb7eb3..b489ade2 100644
--- a/utils.py
+++ b/utils.py
@@ -36,7 +36,7 @@ extract information from it
__docformat__ = "restructuredtext en"
-from logilab.astng._exceptions import ASTNGBuildingException
+from logilab.astng.exceptions import ASTNGBuildingException
class ASTVisitor(object):
"""Abstract Base Class for Python AST Visitors.