You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 rclpy operations like append and remove are 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.
From testing
rclpywith the new changes two bugs/issue have appeared.typing.NoReturnis buggy.Service and Actions are treated as
Callable[[], NoReturn]which just creates all sorts of badness.See
NoReturnon__new__and__init__disables accessing@classmethods andClassVars directly from the class python/mypy#14044 for more details.Simple enough fix just replace the more correct
typing.NoReturnwithNone.#229
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.