Closed bmerry closed 3 days ago
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! If you have an idea for a solution, we would really welcome a Pull Request with proposed changes. See the Contributing Guide for more. It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better. Thank you!
What happened?
When using mypy to check my code, I'm getting a spurious error. When passing a single string to
get_axis_num
, the return type is determined to betuple[int, ...]
instead ofint
.What did you expect to happen?
I expected the return type to be
int
when passing a single single.Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
From a quick look at the code, I'm guessing this is because
str
is iterable and so is matching the first@overload
.Environment