Tests: python: use quoted annotations to support python <= 3.6
[lttng-tools.git] / tests / utils / lttngtest / logger.py
index 9f90ec06ab1a775b48a2023d22e411dad6b7eddb..b0363d1ab511027966a883b29c1313414dbcaa1b 100644 (file)
@@ -8,13 +8,16 @@ from typing import Callable, Optional
 
 
 class _Logger:
-    def __init__(self, log: Optional[Callable[[str], None]]):
-        self._logging_function: Optional[Callable[[str], None]] = log
+    def __init__(self, log):
+        # type: (Optional[Callable[[str], None]]) -> None
+        self._logging_function = log  # type: Optional[Callable[[str], None]]
 
-    def _log(self, msg: str) -> None:
+    def _log(self, msg):
+        # type: (str) -> None
         if self._logging_function:
             self._logging_function(msg)
 
     @property
-    def logger(self) -> Optional[Callable[[str], None]]:
+    def logger(self):
+        # type: () -> Optional[Callable[[str], None]]
         return self._logging_function
This page took 0.024198 seconds and 4 git commands to generate.