'''
import argparse
+import collections
import filecmp # diff
import os
import queue
# Main converter class. Thread safe.
class Converter:
- def __init__(self, outstreamFunction: typing.Callable[[str], None]) -> None:
+ def __init__(self, outstreamFunction: collections.abc.Callable[[str], None]) -> None:
self._running: bool = False
self._stopSignal: bool = False
self._runLock: threading.Lock = threading.Lock()
- self._outstreamFunction: typing.Callable[[str], None] = outstreamFunction
+ self._outstreamFunction: collections.abc.Callable[[str], None] = outstreamFunction
self._logLock: threading.Lock = threading.Lock()
self._statsLock: threading.Lock = threading.Lock()
if not node.tag.endswith("trackList"):
continue
- # Each element is a string path.
for track in node: # <track> in <trackList>.
if not track.tag.endswith("track"):
continue
- element: typing.Optional[xml.etree.ElementTree.Element] = track.find("{" + xmlns + "}location")
+ element: xml.etree.ElementTree.Element | None = track.find("{" + xmlns + "}location")
if element is None:
continue