pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.62k stars 1.09k forks source link

DataTree should not be "Generic" #9445

Closed shoyer closed 2 months ago

shoyer commented 2 months ago

DataTree isn't a Generic tree type. It's a specific tree type -- the nodes are DataTree objects.

This was resulting in many cases where mypy insisting on explicit type annotations, e.g., tree: DataTree = DataTree(...), which is unnecessary and annoying boilerplate.