summaryrefslogtreecommitdiff
path: root/astroid/node_classes.py
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-06-13 20:34:25 +0200
committerGitHub <noreply@github.com>2021-06-13 20:34:25 +0200
commit032fb3acc21fd939f4d77ffcb622bcc2f4a1ba73 (patch)
treeb3e8ad8a2150eead3398553da0136bcc66ca3357 /astroid/node_classes.py
parent688b9c750d3346faf96a737f5904d25fcca48c97 (diff)
downloadastroid-git-032fb3acc21fd939f4d77ffcb622bcc2f4a1ba73.tar.gz
Deprecate Ellipsis node (#1025)
Diffstat (limited to 'astroid/node_classes.py')
-rw-r--r--astroid/node_classes.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/astroid/node_classes.py b/astroid/node_classes.py
index c8272266..68333d92 100644
--- a/astroid/node_classes.py
+++ b/astroid/node_classes.py
@@ -37,7 +37,6 @@ import abc
import builtins as builtins_mod
import itertools
import pprint
-import sys
import typing
from functools import lru_cache
from functools import singledispatch as _singledispatch
@@ -54,7 +53,6 @@ except ImportError:
BUILTINS = builtins_mod.__name__
MANAGER = manager.AstroidManager()
-PY38 = sys.version_info[:2] >= (3, 8)
def _is_const(value):
@@ -2967,20 +2965,10 @@ class Ellipsis(mixins.NoChildrenMixin, NodeNG): # pylint: disable=redefined-bui
An :class:`Ellipsis` is the ``...`` syntax.
- >>> node = astroid.extract_node('...')
- >>> node
- <Ellipsis l.1 at 0x7f23b2e35160>
+ Deprecated since v2.6.0 - Use :class:`Const` instead.
+ Will be removed with the release v2.7.0
"""
- def bool_value(self, context=None):
- """Determine the boolean value of this node.
-
- :returns: The boolean value of this node.
- For an :class:`Ellipsis` this is always ``True``.
- :rtype: bool
- """
- return True
-
class EmptyNode(mixins.NoChildrenMixin, NodeNG):
"""Holds an arbitrary object in the :attr:`LocalsDictNodeNG.locals`."""
@@ -5045,9 +5033,8 @@ CONST_CLS = {
set: Set,
type(None): Const,
type(NotImplemented): Const,
+ type(...): Const,
}
-if PY38:
- CONST_CLS[type(...)] = Const
def _update_const_classes():