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