summaryrefslogtreecommitdiff
path: root/astroid/helpers.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-08-18 23:04:14 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-08-18 23:17:45 +0200
commit44fc1e1e23fd1d3b43cf80a10eb1c032a4312a2b (patch)
tree5c6c2ad5028be821b72fdbda71160fe22b93f0e3 /astroid/helpers.py
parent76036144e4b0049575d5c2f0c64d6365529ee9e7 (diff)
downloadastroid-git-builtin-simplified.tar.gz
Replace the constant BUILTINS by the string 'builtins'builtin-simplified
This make for clearer and also sligtly faster code (means time seems to decrese by 0.68% with this change alone (astroid/pylint) in the pylint tests benchmarks). Done because we were using an import from astroid from astroid.bases for one of those, which is kinda messy.
Diffstat (limited to 'astroid/helpers.py')
-rw-r--r--astroid/helpers.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py
index e6ae3abf..f0fbedb6 100644
--- a/astroid/helpers.py
+++ b/astroid/helpers.py
@@ -21,7 +21,6 @@ Various helper utilities.
from astroid import bases
from astroid import context as contextmod
from astroid import manager, nodes, raw_building, util
-from astroid.const import BUILTINS
from astroid.exceptions import (
AstroidTypeError,
AttributeInferenceError,
@@ -40,7 +39,7 @@ def _build_proxy_class(cls_name, builtins):
def _function_type(function, builtins):
if isinstance(function, scoped_nodes.Lambda):
- if function.root().name == BUILTINS:
+ if function.root().name == "builtins":
cls_name = "builtin_function_or_method"
else:
cls_name = "function"