| Index: third_party/logilab/astroid/manager.py
|
| diff --git a/third_party/logilab/astroid/manager.py b/third_party/logilab/astroid/manager.py
|
| index f5f1d79f40c605c31a21a55429f01e7f000c6467..fe787136d421adb683c87b0b9f516550975ce38a 100644
|
| --- a/third_party/logilab/astroid/manager.py
|
| +++ b/third_party/logilab/astroid/manager.py
|
| @@ -144,7 +144,7 @@ class AstroidManager(OptionsProviderMixIn):
|
| if module is not None:
|
| return module
|
| elif mp_type in (imp.C_BUILTIN, imp.C_EXTENSION):
|
| - if mp_type == imp.C_EXTENSION and not self._can_load_extension(modname):
|
| + if mp_type == imp.C_EXTENSION and not self._can_load_extension(modname):
|
| return self._build_stub_module(modname)
|
| try:
|
| module = modutils.load_module_from_name(modname)
|
| @@ -311,7 +311,7 @@ class AstroidManager(OptionsProviderMixIn):
|
| self.transforms[node_class].remove((transform, predicate))
|
|
|
| def register_failed_import_hook(self, hook):
|
| - """"Registers a hook to resolve imports that cannot be found otherwise.
|
| + """Registers a hook to resolve imports that cannot be found otherwise.
|
|
|
| `hook` must be a function that accepts a single argument `modname` which
|
| contains the name of the module or package that could not be imported.
|
| @@ -348,15 +348,16 @@ class AstroidManager(OptionsProviderMixIn):
|
| """Cache a module if no module with the same name is known yet."""
|
| self.astroid_cache.setdefault(module.name, module)
|
|
|
| - def clear_cache(self):
|
| + def clear_cache(self, astroid_builtin=None):
|
| # XXX clear transforms
|
| self.astroid_cache.clear()
|
| # force bootstrap again, else we may ends up with cache inconsistency
|
| # between the manager and CONST_PROXY, making
|
| # unittest_lookup.LookupTC.test_builtin_lookup fail depending on the
|
| # test order
|
| - from astroid.raw_building import astroid_bootstrapping
|
| - astroid_bootstrapping()
|
| + import astroid.raw_building
|
| + astroid.raw_building._astroid_bootstrapping(
|
| + astroid_builtin=astroid_builtin)
|
|
|
|
|
| class Project(object):
|
|
|