Skip to content

Commit fb0c7a7

Browse files
committed
rm unused Any imports
1 parent c8aad3d commit fb0c7a7

4 files changed

Lines changed: 8 additions & 14 deletions

File tree

yt/_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Optional, TypeAlias
1+
from typing import Optional, TypeAlias
22

33
import numpy as np
44
import numpy.typing as npt

yt/frontends/ramses/hilbert.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Optional
1+
from typing import Optional
22

33
import numpy as np
44
import numpy.typing as npt
@@ -49,9 +49,7 @@
4949
)
5050

5151

52-
def hilbert3d(
53-
ijk: "npt.NDArray[np.int64]", bit_length: int
54-
) -> "npt.NDArray[np.int64]":
52+
def hilbert3d(ijk: "npt.NDArray[np.int64]", bit_length: int) -> "npt.NDArray[np.int64]":
5553
"""Compute the order using Hilbert indexing.
5654
5755
Arguments

yt/frontends/rockstar/data_structures.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import glob
22
import os
33
from functools import cached_property
4-
from typing import Any, Optional
4+
from typing import Optional
55

66
import numpy as np
77
import numpy.typing as npt
@@ -48,9 +48,7 @@ def __init__(self, ds, io, filename, file_id, range):
4848

4949
super().__init__(ds, io, filename, file_id, range)
5050

51-
def _read_member(
52-
self, ihalo: int
53-
) -> Optional["npt.NDArray[np.int64]"]:
51+
def _read_member(self, ihalo: int) -> Optional["npt.NDArray[np.int64]"]:
5452
if ihalo not in self._ids_halos:
5553
return None
5654

yt/geometry/coordinates/coordinate_handler.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import weakref
33
from functools import cached_property
44
from numbers import Number
5-
from typing import Any, Literal, overload
5+
from typing import Literal, overload
66

77
import numpy as np
8+
import numpy.typing as npt
89

910
from yt._typing import AxisOrder
1011
from yt.funcs import fix_unitary, is_sequence, parse_center_array, validate_width_tuple
1112
from yt.units.yt_array import YTArray, YTQuantity
1213
from yt.utilities.exceptions import YTCoordinateNotImplemented, YTInvalidWidthError
13-
import numpy.typing as npt
1414

1515

1616
def _unknown_coord(data):
@@ -173,9 +173,7 @@ def pixelize(
173173
periodic=True,
174174
*,
175175
return_mask: Literal[True],
176-
) -> tuple[
177-
"npt.NDArray[np.float64]", "npt.NDArray[np.bool_]"
178-
]: ...
176+
) -> tuple["npt.NDArray[np.float64]", "npt.NDArray[np.bool_]"]: ...
179177

180178
@abc.abstractmethod
181179
def pixelize(

0 commit comments

Comments
 (0)