diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-12 13:10:46 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-12 13:10:46 +0300 |
commit | 067be2a2d551e87d0fd19b8a92ab0d6ab39d11fd (patch) | |
tree | 2a5714ec5ec3b30115e658cc0f9f8b2d7a3de15f /pylint/checkers/utils.py | |
parent | f3f93c29dc8e885b9566a6f99b3a144cac6696f7 (diff) | |
download | pylint-067be2a2d551e87d0fd19b8a92ab0d6ab39d11fd.tar.gz |
Rewrite is_builtin to be cleaner.
Diffstat (limited to 'pylint/checkers/utils.py')
-rw-r--r-- | pylint/checkers/utils.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py index 4020779..0dbf6cb 100644 --- a/pylint/checkers/utils.py +++ b/pylint/checkers/utils.py @@ -129,14 +129,10 @@ def is_builtin_object(node): """Returns True if the given node is an object from the __builtin__ module.""" return node and node.root().name == BUILTINS_NAME -def is_builtin(name): # was is_native_builtin +def is_builtin(name): """return true if <name> could be considered as a builtin defined by python """ - if name in builtins: - return True - if name in SPECIAL_BUILTINS: - return True - return False + return name in builtins or name in SPECIAL_BUILTINS def is_defined_before(var_node): """return True if the variable node is defined by a parent node (list, |