Skip to content

Commit

Permalink
MNT #309 typos
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Dec 12, 2023
1 parent 573aef6 commit 2854196
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hkl/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ def has_valid_position(pos):
# so use the current motor positions
return False
elif isinstance(pos, (list, tuple)):
if len(position) != len(calc.axes_r):
if len(pos) != len(calc.axes_r):
# fmt: off
raise ValueError(
f"Expected {len(calc.axes_r)}"
f" positions, received {position!r}"
f" positions, received {pos!r}"
)
# fmt: on
if False in [isinstance(v, (int, float)) for v in pos]:
Expand All @@ -385,8 +385,8 @@ def has_valid_position(pos):
if False in [isinstance(v, (int, float)) for v in pos]:
raise TypeError(f"All values must be numeric, received {pos!r}")
return True
elif isinstance(position, (int, float)):
raise TypeError(f"Expected positions, received {position!r}")
elif isinstance(pos, (int, float)):
raise TypeError(f"Expected positions, received {pos!r}")
# fmt: off
return TypeError(
f"Expected list, tuple, or calc.Position() object,"
Expand Down

0 comments on commit 2854196

Please sign in to comment.