Skip to content

Commit 9c3f18a

Browse files
committed
fix(fnop) avoid equal-checks results for pandas ...
`in` operator does ==.
1 parent 14327b6 commit 9c3f18a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

graphtik/fnop.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,20 @@ def _zip_results_with_provides(self, results) -> dict:
732732
f"\n {debug_var_tip}"
733733
)
734734

735-
elif results in (NO_RESULT, NO_RESULT_BUT_SFX) and rescheduled:
735+
elif rescheduled and (results is NO_RESULT or results is NO_RESULT_BUT_SFX):
736736
results = (
737737
{}
738-
if results == NO_RESULT_BUT_SFX
738+
if results is NO_RESULT_BUT_SFX
739739
# Cancel also any SFX.
740740
else {p: False for p in set(self.provides) if is_sfx(p)}
741741
)
742742

743743
elif not fn_expected: # All provides were sideffects?
744-
if results and results not in (NO_RESULT, NO_RESULT_BUT_SFX):
744+
if (
745+
results is not None
746+
and results is not NO_RESULT
747+
and results is not NO_RESULT_BUT_SFX
748+
):
745749
## Do not scream,
746750
# it is common to call a function for its sideffects,
747751
# which happens to return an irrelevant value.
@@ -755,7 +759,7 @@ def _zip_results_with_provides(self, results) -> dict:
755759
else: # Handle result sequence: no-result, single-item, many
756760
nexpected = len(fn_expected)
757761

758-
if results in (NO_RESULT, NO_RESULT_BUT_SFX):
762+
if results is NO_RESULT or results is NO_RESULT_BUT_SFX:
759763
results = ()
760764
ngot = 0
761765

0 commit comments

Comments
 (0)