Improve a few types in xml.dom.minidom. (#5923)

* Changes the return type of getDOMImplementation from implicit Any to
  DOMImplementation | None.
* DOMImplementation.createDocument() and createDocumentType() allow None for all arguments.
This commit is contained in:
Rebecca Chen
2021-08-13 14:28:47 -07:00
committed by GitHub
parent 774da45449
commit 431c4f7fc1

View File

@@ -7,7 +7,7 @@ from xml.sax.xmlreader import XMLReader
def parse(file: str | IO[Any], parser: XMLReader | None = ..., bufsize: int | None = ...): ...
def parseString(string: str | bytes, parser: XMLReader | None = ...): ...
def getDOMImplementation(features=...): ...
def getDOMImplementation(features=...) -> DOMImplementation | None: ...
class Node(xml.dom.Node):
namespaceURI: str | None
@@ -246,8 +246,8 @@ class Notation(Identified, Childless, Node):
class DOMImplementation(DOMImplementationLS):
def hasFeature(self, feature, version) -> bool: ...
def createDocument(self, namespaceURI: str, qualifiedName: str, doctype): ...
def createDocumentType(self, qualifiedName: str, publicId, systemId): ...
def createDocument(self, namespaceURI: str | None, qualifiedName: str | None, doctype): ...
def createDocumentType(self, qualifiedName: str | None, publicId, systemId): ...
def getInterface(self, feature): ...
class ElementInfo: