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

Unified Diff: third_party/logilab/astroid/raw_building.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/modutils.py ('k') | third_party/logilab/astroid/rebuilder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/astroid/raw_building.py
diff --git a/third_party/logilab/astroid/raw_building.py b/third_party/logilab/astroid/raw_building.py
index 08f6af6da9cb7ee9ecc25f66987af35c69f2f26f..d5e8b3d32bb8b7e222ccc74d5c261198aba15201 100644
--- a/third_party/logilab/astroid/raw_building.py
+++ b/third_party/logilab/astroid/raw_building.py
@@ -332,12 +332,14 @@ class InspectBuilder(object):
Astroid_BUILDER = InspectBuilder()
_CONST_PROXY = {}
-def astroid_bootstrapping():
+def _astroid_bootstrapping(astroid_builtin=None):
"""astroid boot strapping the builtins module"""
# this boot strapping is necessary since we need the Const nodes to
# inspect_build builtins, and then we can proxy Const
- from logilab.common.compat import builtins
- astroid_builtin = Astroid_BUILDER.inspect_build(builtins)
+ if astroid_builtin is None:
+ from logilab.common.compat import builtins
+ astroid_builtin = Astroid_BUILDER.inspect_build(builtins)
+
for cls, node_cls in CONST_CLS.items():
if cls is type(None):
proxy = build_class('NoneType')
@@ -349,7 +351,7 @@ def astroid_bootstrapping():
else:
_CONST_PROXY[cls] = proxy
-astroid_bootstrapping()
+_astroid_bootstrapping()
# TODO : find a nicer way to handle this situation;
# However __proxied introduced an
« no previous file with comments | « third_party/logilab/astroid/modutils.py ('k') | third_party/logilab/astroid/rebuilder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698