Use built-in collections as generic types

This commit is contained in:
Marko Durkovic
2021-08-06 12:03:29 +02:00
committed by Florian Friesdorf
parent f33e65b14a
commit 5bd1bcbd83
10 changed files with 78 additions and 81 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ from rosbags.typesys import get_types_from_msg, register_types
if TYPE_CHECKING:
from pathlib import Path
from typing import Any, Dict, Optional
from typing import Any, Optional
from rosbags.rosbag1.reader import Connection as RConnection
@@ -80,8 +80,8 @@ def convert(src: Path, dst: Optional[Path]) -> None:
try:
with Reader(src) as reader, Writer(dst) as writer:
typs: Dict[str, Any] = {}
connmap: Dict[int, WConnection] = {}
typs: dict[str, Any] = {}
connmap: dict[int, WConnection] = {}
for rconn in reader.connections.values():
candidate = convert_connection(rconn)