rosidl_python
rosidl_python copied to clipboard
Tracking for Static Typing Related Bugs
From testing rclpy with the new changes two bugs/issue have appeared.
-
typing.NoReturnis buggy. Service and Actions are treated asCallable[[], NoReturn]which just creates all sorts of badness. See https://github.com/python/mypy/issues/14044 for more details.
Simple enough fix just replace the more correct typing.NoReturn with None.
#229
- Assuming only list for containers
Containers are defined as a Union[list[T], Sequence[T], AbstractSet[T]]. However, in
rclpyoperations likeappendandremoveare called on these fields when they might not exist.
Unlike 1. this is not a bug since mypy is now correctly exposing incorrect behavior, but I imagine that users might find it cumbersome to have to wrap the result in a more finite type to use any methods at all on them.