diff --git a/CHANGELOG.md b/CHANGELOG.md index 780f2da2..c0781417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ## Unreleased +### Fixed + +- Fixed `DriveBase.angle` reporting an incorrect return type. + ## 3.6.1 - 2025-05-01 ### Fixed diff --git a/jedi/tests/test_get_signature.py b/jedi/tests/test_get_signature.py index 426b30d4..a2aa1aa1 100644 --- a/jedi/tests/test_get_signature.py +++ b/jedi/tests/test_get_signature.py @@ -1020,7 +1020,7 @@ def _get_method_signature(module: str, type: str, method: str) -> SignatureHelp: pytest.param("pybricks.robotics", "DriveBase", "stop", [([], "None")]), pytest.param("pybricks.robotics", "DriveBase", "brake", [([], "None")]), pytest.param("pybricks.robotics", "DriveBase", "distance", [([], "int")]), - pytest.param("pybricks.robotics", "DriveBase", "angle", [([], "int")]), + pytest.param("pybricks.robotics", "DriveBase", "angle", [([], "float")]), pytest.param( "pybricks.robotics", "DriveBase", "state", [([], "Tuple[int, int, int, int]")] ), diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index 8dd36c73..d18004bc 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -101,8 +101,8 @@ def distance(self) -> int: Driven distance since last reset. """ - def angle(self) -> int: - """angle() -> int: deg + def angle(self) -> float: + """angle() -> float: deg Gets the estimated rotation angle of the drive base.