sematic-ai / sematic

An open-source ML pipeline development platform
Other
969 stars 58 forks source link

Improve <3.9 type-checking for list/set #1044

Closed augray closed 1 year ago

augray commented 1 year ago

List and Set were doing a comparison in their can_cast_type functions that assumed the List[T] variant of the type was being used instead of the list[T] variant. This PR makes the check compatible with both of these variants. It also adds a unit test for the Set type, which had been missing.