From 9d9c5b8b9285131823d0c116a98fefa81024a19d Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Fri, 18 Oct 2024 16:12:02 -0300 Subject: [PATCH] Expose ROSProcess CLI argument parser Signed-off-by: Michel Hidalgo --- bdai_ros2_wrappers/bdai_ros2_wrappers/process.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py b/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py index eed6838..4d1e2a5 100644 --- a/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py +++ b/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py @@ -105,6 +105,11 @@ def __init__( self._lock = threading.Lock() functools.update_wrapper(self, self._func) + @property + def cli(self) -> typing.Optional[argparse.ArgumentParser]: + """Get the associated CLI argument parser, if any.""" + return self._cli + def __getattr__(self, name: str) -> typing.Any: """Gets missing attributes from the underlying scope.