Logging._log()'s params arg should be typing.Optiona[]

This commit is contained in:
jesopo 2019-06-07 13:35:20 +01:00
parent ea924df883
commit accd7a8941

View file

@ -61,5 +61,6 @@ class Log(object):
self._log(message, params, logging.ERROR, kwargs) self._log(message, params, logging.ERROR, kwargs)
def critical(self, message: str, params: typing.List=None, **kwargs): def critical(self, message: str, params: typing.List=None, **kwargs):
self._log(message, params, logging.CRITICAL, kwargs) self._log(message, params, logging.CRITICAL, kwargs)
def _log(self, message: str, params: typing.List, level: int, kwargs: dict): def _log(self, message: str, params: typing.Optional[typing.List],
level: int, kwargs: dict):
self.logger.log(level, message, *(params or []), **kwargs) self.logger.log(level, message, *(params or []), **kwargs)