Closed thehunmonkgroup closed 3 months ago
This bug was treated in the 2.4.0 release?
@mhalano No, this issue is still pending a fix :slightly_smiling_face: actually something I would consider a good first issue!
@thehunmonkgroup The proposal for making LazyUUIDTaskSet
comparable with a regular set
of UUIDs sounds good to me.
which would do the required loading of the dependencies, and convert them to a proper set
Unclear if you mean that the laziness would have to be dropped, because I suspect that does not have the be the case.
Unclear if you mean that the laziness would have to be dropped, because I suspect that does not have the be the case.
I don't think it would have to be dropped. If I understand the overloaded comparison operators correctly, the lazy UUIDs could be converting to a proper set in the overloaded method, so lazy UUIDs would only be converted to proper UUIDs when the set is part of a comparison.
lazy UUIDs would only be converted to proper UUIDs when the set is part of a comparison.
Correct, we're on the same page then. This can even just happen within the operator implementation internally, so no changes to the object itself are needed. Actually a lot of operators are overloaded, it's just that __gt__
and __lt__
are not among them.
@tbabej The PR made by @RonMcKay didn't close this issue?
Pretty sure this is done.
https://github.com/vit-project/vit/issues/300 exposes a limitation in
LazyUUIDTaskSet
, namely, that it cannot be used in a standard Python comparison, because of a type mismatch.It seems reasonable for tasklib to provide some overloaded comparison operators for
LazyUUIDtTaskSet
, which would do the required loading of the dependencies and convert them to a proper set, so that comparisons work natively.Looks like it should be pretty straightforward: https://www.tutorialspoint.com/How-to-overload-Python-comparison-operators
Thoughts?