From fee2eaae30586c79a3ff63ff69dacf8a1fb5c59b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 4 Jul 2017 19:18:43 -0700 Subject: [PATCH] xml.sax.saxutils: make some functions take AnyStr (#1457) Fixes #1062 --- stdlib/2and3/xml/sax/saxutils.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/2and3/xml/sax/saxutils.pyi b/stdlib/2and3/xml/sax/saxutils.pyi index fb45a6089..80a497cd8 100644 --- a/stdlib/2and3/xml/sax/saxutils.pyi +++ b/stdlib/2and3/xml/sax/saxutils.pyi @@ -1,12 +1,12 @@ import sys -from typing import Mapping +from typing import AnyStr, Mapping from xml.sax import handler from xml.sax import xmlreader -def escape(data: str, entities: Mapping[str, str] = ...) -> str: ... -def unescape(data: str, entities: Mapping[str, str] = ...) -> str: ... -def quoteattr(data: str, entities: Mapping[str, str] = ...) -> str: ... +def escape(data: AnyStr, entities: Mapping[str, str] = ...) -> AnyStr: ... +def unescape(data: AnyStr, entities: Mapping[str, str] = ...) -> AnyStr: ... +def quoteattr(data: AnyStr, entities: Mapping[str, str] = ...) -> AnyStr: ... class XMLGenerator(handler.ContentHandler): if sys.version_info >= (3, 0):