Skip to content

Commit

Permalink
MNT #310 consider RealPos
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Dec 14, 2023
1 parent 95be6c9 commit 7f8bef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hkl/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def has_valid_position(pos):
if pos is None:
# so use the current motor positions
return False
elif type(pos).__name__.startswith("Pos"):
elif type(pos).__name__.startswith("Pos") or type(pos).__name__.endswith("RealPos"):
# This is (probably) a calc.Position namedtuple
if False in [isinstance(v, (int, float)) for v in pos]:
raise TypeError(f"All values must be numeric, received {pos!r}")
Expand Down

0 comments on commit 7f8bef8

Please sign in to comment.