summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFELD Boris <lothiraldan@gmail.com>2012-07-09 17:23:46 +0200
committerFELD Boris <lothiraldan@gmail.com>2012-07-09 17:23:46 +0200
commit30ea2492e86523e21f940f0ae09a1366b6070600 (patch)
treedf05fce0025774badaf5f3b66d9fea2480f0b5d9
parentee1a5b1e0e3c68b3747f88c8f82b2d9544408ae5 (diff)
downloadpylint-git-30ea2492e86523e21f940f0ae09a1366b6070600.tar.gz
Fix checkers.utils for other implementations (use of __builtins__). Closes #99139. Closes #89838. Theses fixes need fixes on logilab-astng and logilab-common
-rw-r--r--checkers/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/checkers/utils.py b/checkers/utils.py
index f4fc4a88e..cff12fe31 100644
--- a/checkers/utils.py
+++ b/checkers/utils.py
@@ -33,7 +33,7 @@ def is_inside_except(node):
current = node
while current and not isinstance(current.parent, astng.ExceptHandler):
current = current.parent
-
+
return current and current is current.parent.name
@@ -113,7 +113,7 @@ def is_empty(body):
"""return true if the given node does nothing but 'pass'"""
return len(body) == 1 and isinstance(body[0], astng.Pass)
-builtins = __builtins__.copy()
+builtins = builtins.__dict__.copy()
SPECIAL_BUILTINS = ('__builtins__',) # '__path__', '__file__')
def is_builtin(name): # was is_native_builtin
@@ -370,4 +370,4 @@ def is_attr_private(attrname):
at most one trailing underscore)
"""
regex = re.compile('^_{2,}.*[^_]+_?$')
- return regex.match(attrname) \ No newline at end of file
+ return regex.match(attrname)