Skip to content

Commit 952868b

Browse files
committed
Remove BOOL_SPECIAL_METHOD
1 parent 48054ce commit 952868b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

ChangeLog

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,14 @@ Release date: TBA
8888

8989
Refs #1490
9090

91-
* Remove ``astroid.const.PY38_PLUS`` and the previously deprecated ``astroid.const.BUILTINS``,
92-
``astroid.bases.BUILTINS``, as well as ``astroid.const.Load``, ``..Store``, and ``..Del``.
91+
* Remove unused and / or deprecated constants:
92+
- ``astroid.bases.BOOL_SPECIAL_METHOD``
93+
- ``astroid.bases.BUILTINS``
94+
- ``astroid.const.BUILTINS``
95+
- ``astroid.const.PY38_PLUS``
96+
- ``astroid.const.Load``
97+
- ``astroid.const.Store``
98+
- ``astroid.const.Del``
9399

94100
Refs #2141
95101

astroid/bases.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
from astroid.constraint import Constraint
4040

4141

42-
# TODO: check if needs special treatment
43-
BOOL_SPECIAL_METHOD = "__bool__"
44-
4542
PROPERTIES = {"builtins.property", "abc.abstractproperty"}
4643
if PY310_PLUS:
4744
PROPERTIES.add("enum.property")
@@ -382,7 +379,7 @@ def bool_value(
382379
context.boundnode = self
383380

384381
try:
385-
result = _infer_method_result_truth(self, BOOL_SPECIAL_METHOD, context)
382+
result = _infer_method_result_truth(self, "__bool__", context)
386383
except (InferenceError, AttributeInferenceError):
387384
# Fallback to __len__.
388385
try:

0 commit comments

Comments
 (0)