Skip to content

Commit 00c8ea3

Browse files
authored
Merge pull request SCons#4448 from fazledyn-or/Fix_Improper_Method_Call_NotImplementedError
Fixed Improper Method Call: Replaced `NotImplementedError`
2 parents a998627 + cd2abea commit 00c8ea3

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
1515
- Fix of the --debug=sconscript option to return exist statements when using return
1616
statement with stop flag enabled
1717

18+
From Ataf Fazledin Ahamed:
19+
- Use of NotImplemented instead of NotImplementedError for special methods
20+
of _ListVariable class
21+
1822
RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700
1923

2024
From Max Bachmann:

RELEASE.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ FIXES
3838
IMPROVEMENTS
3939
------------
4040

41-
- List improvements that wouldn't be visible to the user in the
42-
documentation: performance improvements (describe the circumstances
43-
under which they would be observed), or major code cleanups
41+
- Use of NotImplemented instead of NotImplementedError for special methods
42+
of _ListVariable class
4443

4544
PACKAGING
4645
---------

SCons/Variables/ListVariable.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ def __init__(self, initlist=None, allowedElems=None) -> None:
7070
self.allowedElems = sorted(allowedElems)
7171

7272
def __cmp__(self, other):
73-
raise NotImplementedError
73+
return NotImplemented
7474

7575
def __eq__(self, other):
76-
raise NotImplementedError
76+
return NotImplemented
7777

7878
def __ge__(self, other):
79-
raise NotImplementedError
79+
return NotImplemented
8080

8181
def __gt__(self, other):
82-
raise NotImplementedError
82+
return NotImplemented
8383

8484
def __le__(self, other):
85-
raise NotImplementedError
85+
return NotImplemented
8686

8787
def __lt__(self, other):
88-
raise NotImplementedError
88+
return NotImplemented
8989

9090
def __str__(self) -> str:
9191
if not len(self):

0 commit comments

Comments
 (0)