Skip to content

Commit

Permalink
move the type ignores to the import
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Jan 18, 2024
1 parent 6f17983 commit edf069a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions xarray/core/duck_array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@

# remove once numpy 2.0 is the oldest supported version
if module_available("numpy", minversion="2.0.0.dev0"):
from numpy.lib.array_utils import (
normalize_axis_index, # type: ignore[import-not-found]
from numpy.lib.array_utils import ( # type: ignore[import-not-found]
normalize_axis_index,
)
else:
from numpy.core.multiarray import (
normalize_axis_index, # type: ignore[attr-defined,no-redef]
from numpy.core.multiarray import ( # type: ignore[attr-defined,no-redef]
normalize_axis_index,
)


Expand Down
8 changes: 4 additions & 4 deletions xarray/core/nputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

# remove once numpy 2.0 is the oldest supported version
if module_available("numpy", minversion="2.0.0.dev0"):
from numpy.lib.array_utils import (
normalize_axis_index, # type: ignore[import-not-found]
from numpy.lib.array_utils import ( # type: ignore[import-not-found]
normalize_axis_index,
)
else:
from numpy.core.multiarray import (
normalize_axis_index, # type: ignore[attr-defined,no-redef]
from numpy.core.multiarray import ( # type: ignore[attr-defined,no-redef]
normalize_axis_index,
)

# remove once numpy 2.0 is the oldest supported version
Expand Down

0 comments on commit edf069a

Please sign in to comment.