Skip to content

Commit

Permalink
tentative fix typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Sep 14, 2024
1 parent 1bdec7f commit 208616b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions yt/visualization/plot_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import matplotlib
import numpy as np
from more_itertools import always_iterable
from numpy.typing import ArrayLike
from unyt.exceptions import UnitConversionError

from yt._maintenance.deprecation import issue_deprecation_warning
Expand Down Expand Up @@ -1380,7 +1379,7 @@ class NormalPlot:
"""

@staticmethod
def sanitize_normal_vector(ds, normal: str | int | ArrayLike) -> str | np.ndarray:
def sanitize_normal_vector(ds, normal) -> str | np.ndarray:
"""Return the name of a cartesian axis whener possible,
or a 3-element 1D ndarray of float64 in any other valid case.
Fail with a descriptive error message otherwise.
Expand All @@ -1402,7 +1401,7 @@ def sanitize_normal_vector(ds, normal: str | int | ArrayLike) -> str | np.ndarra
)
return axis_names[normal]

if not is_sequence(normal): # type: ignore [unreachable]
if not is_sequence(normal):
raise TypeError(
f"{normal} is not a valid normal vector identifier. "
"Expected a string, integer or sequence of 3 floats."
Expand Down

0 comments on commit 208616b

Please sign in to comment.