Skip to content

Commit 158c85f

Browse files
committed
Merge remote-tracking branch 'origin/humble' into backport-953-humble
2 parents 3bd58f5 + 7ddc5b0 commit 158c85f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

rosbridge_library/src/rosbridge_library/internal/ros_loader.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
import importlib
3535
from threading import Lock
36-
from typing import Any
36+
from typing import Any, Dict, Tuple
3737

3838
""" ros_loader contains methods for dynamically loading ROS message classes at
3939
runtime. It's achieved by using roslib to load the manifest files for the
@@ -129,7 +129,7 @@ def get_action_result_instance(typestring: str) -> Any:
129129

130130

131131
def _get_interface_class(
132-
typestring: str, intf_type: str, loaded_intfs: dict[str, Any], intf_lock: Lock
132+
typestring: str, intf_type: str, loaded_intfs: Dict[str, Any], intf_lock: Lock
133133
) -> Any:
134134
"""
135135
If not loaded, loads the specified ROS interface class then returns an instance of it.
@@ -152,7 +152,7 @@ def _get_interface_class(
152152
return _get_class(typestring, intf_type, loaded_intfs, intf_lock)
153153

154154

155-
def _get_class(typestring: str, subname: str, cache: dict[str, Any], lock: Lock) -> Any:
155+
def _get_class(typestring: str, subname: str, cache: Dict[str, Any], lock: Lock) -> Any:
156156
"""If not loaded, loads the specified class then returns an instance
157157
of it.
158158
@@ -206,7 +206,7 @@ def _load_class(modname: str, subname: str, classname: str) -> None:
206206
raise InvalidClassException(modname, subname, classname, exc)
207207

208208

209-
def _splittype(typestring: str) -> tuple[str, str]:
209+
def _splittype(typestring: str) -> Tuple[str, str]:
210210
"""Split the string the / delimiter and strip out empty strings
211211
212212
Performs similar logic to roslib.names.package_resource_name but is a bit
@@ -220,13 +220,13 @@ def _splittype(typestring: str) -> tuple[str, str]:
220220
raise InvalidTypeStringException(typestring)
221221

222222

223-
def _add_to_cache(cache: dict[str, Any], lock: Lock, key: str, value: any) -> None:
223+
def _add_to_cache(cache: Dict[str, Any], lock: Lock, key: str, value: any) -> None:
224224
lock.acquire()
225225
cache[key] = value
226226
lock.release()
227227

228228

229-
def _get_from_cache(cache: dict[str, Any], lock: Lock, key: str) -> Any:
229+
def _get_from_cache(cache: Dict[str, Any], lock: Lock, key: str) -> Any:
230230
"""Returns the value for the specified key from the cache.
231231
Locks the lock before doing anything. Returns None if key not in cache"""
232232
lock.acquire()

0 commit comments

Comments
 (0)