Commit 13c52b2
More informative error for passing a list to dataset.transpose (#7120)
* Added statement to check if list is passed for dims and raise a more helpful error
* Fixed issue where isinstance would not work when no arguments are passed
* Added test
* Updated whats-new.rst
* Updated whats-new.rst with pull number
* Removed test print statement
* Update xarray/core/dataset.py
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
* Fixed test to inclued whole error output and imported regex. Changed transpose join statement
* Hopefully fixed typecheck error and improved readability from suggestions by @max-sixty
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>1 parent 58ab594 commit 13c52b2
3 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5401 | 5401 | | |
5402 | 5402 | | |
5403 | 5403 | | |
| 5404 | + | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
5404 | 5411 | | |
5405 | 5412 | | |
5406 | 5413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
6806 | 6807 | | |
6807 | 6808 | | |
6808 | 6809 | | |
| 6810 | + | |
| 6811 | + | |
| 6812 | + | |
| 6813 | + | |
| 6814 | + | |
| 6815 | + | |
| 6816 | + | |
| 6817 | + | |
| 6818 | + | |
| 6819 | + | |
| 6820 | + | |
| 6821 | + | |
| 6822 | + | |
| 6823 | + | |
0 commit comments