Skip to content

Commit

Permalink
add Tuple[Tuple] to dataset init types
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Jun 25, 2019
1 parent 9b75e6a commit 7bd558f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,13 @@ class Dataset(Mapping, ImplementsDatasetReduce, DataWithCoords):

def __init__(
self,
# could make a VariableArgs to use more generally
# could make a VariableArgs to use more generally, and refine these
# categories
data_vars: Optional[Mapping[Hashable, Union[
'DataArray',
Variable,
Tuple[Hashable, Any],
Tuple[Tuple],

This comment has been minimized.

Copy link
@shoyer

shoyer Jun 25, 2019

Member

I think this should just be Tuple, not Tuple[Tuple]

This comment has been minimized.

Copy link
@max-sixty

max-sixty Jun 25, 2019

Author Collaborator

D'oh! Sorry I'm getting myself confused with the Optional[Mapping[Hashable, Union[ above

This comment has been minimized.

Copy link
@max-sixty

max-sixty Jun 25, 2019

Author Collaborator

Clearing this up by encoding some of the abstractions (e.g. VariableArgs) would be useful. But I'll leave to another day

Tuple[Sequence],
Tuple[Tuple[Hashable, ...], Any],
]]] = None,
Expand Down

0 comments on commit 7bd558f

Please sign in to comment.