- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5
 
Open
Description
I am not convinced that using generics for GroupSpec and ArraySpec is worth it.
It's nice to be able to write
MyArray = ArraySpec[AttrsModel]but I suspect many people find this confusing and would get more out of examples like
class MyArray(ArraySpec):
    attributes: AttrsModelIn principle the generic types could bring value for automatically generating return types of methods like GroupSpec.to_flat, but we can't really resolve the return value of to_flat because it collects everything from subgroups, and the type annotations of those subgroups are not easy to access.
So maybe it would be worth exploring a branch without the generic types. What would feel worse? I'm not sure! But I know a few things that would certainly feel better (like not needing to specialize GroupSpec all the time).
Metadata
Metadata
Assignees
Labels
No labels