summaryrefslogtreecommitdiff
path: root/checkers/utils.py
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
commitc9464c6a347ef277fca17d779639bfc58b5465fd (patch)
tree3eea209b8371061165c52f0d06d8579d1b8a351e /checkers/utils.py
parentb28810c7694f99547287987d034d49f0929203cc (diff)
downloadpylint-c9464c6a347ef277fca17d779639bfc58b5465fd.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
Diffstat (limited to 'checkers/utils.py')
-rw-r--r--checkers/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/checkers/utils.py b/checkers/utils.py
index f4fc4a8..cff12fe 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)