Repository navigation
Conversation
|
Did you notice that your changes broke it? Tests failed. |
81e7b4d to
78e530f
Compare
This allows for passing Constructs with subclass/superclass ParseType/BuildTypes to Subconstructs, as would be expected
78e530f to
604c96c
Compare
|
Ah, yeah. I forgot I was only running the test_core tests... 🤦 Should be fixed now, but I'm not entirely sure my change to the typing of Default is correct. |
|
Tim owns this repository so I cannot give you an authoritative answer. |
|
I also had the same problem with the List as StructField. My solution was to include the type alias I looked at the problem with and with your change mypy works but pyright reports at the same line: I'll have to take a closer look this weekend. (That the package |
|
The implementation of def TStructField(
subcon: Construct[ParsedType, BuildTypes],
...has to be changed to def TStructField(
subcon: Construct[ParsedType, t.Any],
...I will apply your modifications together with other modifications I am doing right now. |
This allows for passing Constructs with subclass/superclass
ParseType/BuildTypesto Subconstructs, as would be expected.The covariance test is admittedly not a great example; my actual reason is for this is to have correctly typed arguments in a
TStruct, but that wouldn't belong in the core tests: