Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: third_party/logilab/astroid/manager.py

Issue 876793002: pylint: upgrade to 1.4.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/logilab/astroid/brain/pysix_moves.py ('k') | third_party/logilab/astroid/modutils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « third_party/logilab/astroid/brain/pysix_moves.py ('k') | third_party/logilab/astroid/modutils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698