Python 3 adds short_empty_elements attribute to xml.sax.saxutils.XMLGenerator. (#1265)

Fix #1265
This commit is contained in:
Matěj Cepl
2017-05-25 17:53:01 +02:00
committed by Jelle Zijlstra
parent 1ebcc1d11f
commit 367743adf0

View File

@@ -1,3 +1,4 @@
import sys
from typing import Mapping
from xml.sax import handler
@@ -8,7 +9,11 @@ def unescape(data: str, entities: Mapping[str, str] = ...) -> str: ...
def quoteattr(data: str, entities: Mapping[str, str] = ...) -> str: ...
class XMLGenerator(handler.ContentHandler):
def __init__(self, out=..., encoding=...) -> None: ...
if sys.version_info >= (3, 0):
def __init__(self, out=..., encoding=...,
short_empty_elements: bool=...) -> None: ...
else:
def __init__(self, out=..., encoding=...) -> None: ...
def startDocument(self): ...
def endDocument(self): ...
def startPrefixMapping(self, prefix, uri): ...