Skip to content

Commit 744d801

Browse files
Merge pull request #114 from pjjefferies/patch-1
Update quarternion type hint to show return of tuple of length 4.
2 parents a5a2e05 + 6deec9d commit 744d801

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_bno055.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,11 @@ def _euler(self) -> None:
460460
raise NotImplementedError("Must be implemented.")
461461

462462
@property
463-
def quaternion(self) -> Tuple[Optional[float], Optional[float], Optional[float]]:
463+
def quaternion(
464+
self,
465+
) -> Tuple[Optional[float], Optional[float], Optional[float], Optional[float]]:
464466
"""Gives the calculated orientation as a quaternion.
465-
Returns an empty tuple of length 3 when this property has been disabled by the current mode.
467+
Returns an empty tuple of length 4 when this property has been disabled by the current mode.
466468
"""
467469
if self.mode in [0x08, 0x09, 0x0A, 0x0B, 0x0C]:
468470
return self._quaternion

0 commit comments

Comments
 (0)