Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 2 type annotations in dataarray.py (#5548)
Both `set_index` and `reset_index` are wrappers to other methods that return `"DataArray"`, not `Optional["DataArray"]`. That is, they will never return None. That's why these methods should also have only `"DataArray"` in there return signature. This way it will be possible to do something like `myarray = myarray.reset_index(...)` without getting a complaint from Mypy. For extended discussion, see #5533 (comment)
- Loading branch information