Jonathan Ming
02/03/2023, 8:43 PMpartitions_def
to my multi-asset. It works totally as expected, which is great! However, pyright
is upset about the typing of the partitions_def
decorator argument just for the multi-asset:
error: Argument of type "StaticPartitionsDefinition" cannot be assigned to parameter "partitions_def" of type "PartitionsDefinition[object] | None" in function "multi_asset"
Type "StaticPartitionsDefinition" cannot be assigned to type "PartitionsDefinition[object] | None"
"StaticPartitionsDefinition" is incompatible with "PartitionsDefinition[object]"
TypeVar "T@PartitionsDefinition" is invariant
"str" is incompatible with "object"
Type cannot be assigned to type "None" (reportGeneralTypeIssues)
This is not that big of a deal for me because the assets actually do work totally fine, partitions and all 👍 But rather than slap a type: ignore
on something I don’t understand, I thought I’d ask why this is happening — my fault? bug? What are your thoughts?jamie
02/03/2023, 10:20 PMStaticPartitionsDefinition
should be a ParitionsDefinition
. We might have a typing bug on our end. @sean would you be able to take a look at this?Jonathan Ming
02/06/2023, 5:36 PM