From dbc34d8529e36baffc57d62390d5e6fbbd3fd880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Thu, 12 Dec 2024 16:52:27 +0100 Subject: [PATCH] Add type annotations to meshcat_visualizer.py --- bindings/python/pinocchio/visualize/meshcat_visualizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/pinocchio/visualize/meshcat_visualizer.py b/bindings/python/pinocchio/visualize/meshcat_visualizer.py index 8a3bcc6f2..77d6265b3 100644 --- a/bindings/python/pinocchio/visualize/meshcat_visualizer.py +++ b/bindings/python/pinocchio/visualize/meshcat_visualizer.py @@ -121,7 +121,7 @@ def __init__(self, dae_path: str, cache: Optional[Set[str]] = None) -> None: self.dae_raw = text_file.read() # Parse the image resource in Collada file - img_resource_paths = [] + img_resource_paths: List[Path] = [] img_lib_element = Et.parse(dae_path).find( "{http://www.collada.org/2005/11/COLLADASchema}library_images" ) @@ -133,7 +133,7 @@ def __init__(self, dae_path: str, cache: Optional[Set[str]] = None) -> None: ] # Convert textures to data URL for Three.js ColladaLoader to load them - self.img_resources = {} + self.img_resources: Dict[str, str] = {} for img_path in img_resource_paths: img_key = str(img_path) # Return empty string if already in cache