From 57caec1a57a3b948d037e8bbf1a9f145460a5e32 Mon Sep 17 00:00:00 2001 From: Gabriel Couchenour <81648551+shaggysa@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:45:26 -0500 Subject: [PATCH 1/3] Update robotics.py change the return type of DriveBase.angle() to be a float in the type stub --- src/pybricks/robotics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. From f638f6425cf7ad3ca0823ae2310b4b42978a663a Mon Sep 17 00:00:00 2001 From: Gabriel Couchenour <81648551+shaggysa@users.noreply.github.com> Date: Fri, 19 Sep 2025 14:12:04 -0500 Subject: [PATCH 2/3] test_get_signature.py update DriveBase.angle --- jedi/tests/test_get_signature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]")] ), From c7469d26f050839240f0308a147323919223c594 Mon Sep 17 00:00:00 2001 From: Gabriel Couchenour <81648551+shaggysa@users.noreply.github.com> Date: Fri, 19 Sep 2025 14:45:48 -0500 Subject: [PATCH 3/3] CHANGELOG.md: add typestub fix --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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