X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Futils%2Flttngtest%2Flogger.py;h=b0363d1ab511027966a883b29c1313414dbcaa1b;hb=ce8470c9d039c563167d4fd061803e9eacf69ec3;hp=9f90ec06ab1a775b48a2023d22e411dad6b7eddb;hpb=544d8425fb15197a195ca16c2993e6a4026c0493;p=lttng-tools.git diff --git a/tests/utils/lttngtest/logger.py b/tests/utils/lttngtest/logger.py index 9f90ec06a..b0363d1ab 100644 --- a/tests/utils/lttngtest/logger.py +++ b/tests/utils/lttngtest/logger.py @@ -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