From 128a49a32d6d406dbb431e4caccd1f39f95f6a82 Mon Sep 17 00:00:00 2001 From: Ilya Konstantinov Date: Mon, 21 May 2018 08:27:16 -0700 Subject: [PATCH] Fix LoggerAdapter.process first argument (#2153) Standard implementation is: ``` def process(self, msg, kwargs): kwargs["extra"] = self.extra return msg, kwargs ``` so the signature is clearly `(Text, ...) -> (Text, ...)` (or `(str, ...) -> (str, ...)`, but following the other stubs here, I gather it's `Text`). --- stdlib/2and3/logging/__init__.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/2and3/logging/__init__.pyi b/stdlib/2and3/logging/__init__.pyi index 6e4463fd9..9fad60dc8 100644 --- a/stdlib/2and3/logging/__init__.pyi +++ b/stdlib/2and3/logging/__init__.pyi @@ -226,7 +226,7 @@ class LogRecord: class LoggerAdapter: def __init__(self, logger: Logger, extra: Mapping[str, Any]) -> None: ... - def process(self, msg: Text, kwargs: MutableMapping[str, Any]) -> Tuple[str, MutableMapping[str, Any]]: ... + def process(self, msg: Text, kwargs: MutableMapping[str, Any]) -> Tuple[Text, MutableMapping[str, Any]]: ... if sys.version_info >= (3,): def debug(self, msg: Text, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ...,