mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-08 04:23:24 +08:00
Better definition for xml/sax/__init__.pyi. (#621)
Also, merge 2.7/xml/sax and 3/xml/sax into 2and3/xml/sax.
This commit is contained in:
committed by
Guido van Rossum
parent
8fec896898
commit
7d80824092
@@ -1,20 +0,0 @@
|
||||
# Stubs for xml.sax (Python 2.7)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
class SAXException(Exception):
|
||||
def __init__(self, msg, exception=None): ...
|
||||
def getMessage(self): ...
|
||||
def getException(self): ...
|
||||
def __getitem__(self, ix): ...
|
||||
|
||||
class SAXParseException(SAXException):
|
||||
def __init__(self, msg, exception, locator): ...
|
||||
def getColumnNumber(self): ...
|
||||
def getLineNumber(self): ...
|
||||
def getPublicId(self): ...
|
||||
def getSystemId(self): ...
|
||||
|
||||
class SAXNotRecognizedException(SAXException): ...
|
||||
class SAXNotSupportedException(SAXException): ...
|
||||
class SAXReaderNotAvailable(SAXNotSupportedException): ...
|
||||
32
stdlib/2and3/xml/sax/__init__.pyi
Normal file
32
stdlib/2and3/xml/sax/__init__.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
import xml.sax
|
||||
from xml.sax.xmlreader import InputSource
|
||||
from xml.sax.handler import ContentHandler, ErrorHandler
|
||||
|
||||
class SAXException(Exception):
|
||||
def __init__(self, msg, exception=None): ...
|
||||
def getMessage(self): ...
|
||||
def getException(self): ...
|
||||
def __getitem__(self, ix): ...
|
||||
|
||||
class SAXParseException(SAXException):
|
||||
def __init__(self, msg, exception, locator): ...
|
||||
def getColumnNumber(self): ...
|
||||
def getLineNumber(self): ...
|
||||
def getPublicId(self): ...
|
||||
def getSystemId(self): ...
|
||||
|
||||
class SAXNotRecognizedException(SAXException): ...
|
||||
class SAXNotSupportedException(SAXException): ...
|
||||
class SAXReaderNotAvailable(SAXNotSupportedException): ...
|
||||
|
||||
default_parser_list = ... # type: List[str]
|
||||
|
||||
def make_parser(parser_list: List[str]) -> xml.sax.xmlreader.XMLReader: ...
|
||||
|
||||
def parse(source: str, handler: xml.sax.handler.ContentHandler,
|
||||
errorHandler: xml.sax.handler.ErrorHandler=...): ...
|
||||
|
||||
def parseString(string: str, handler: xml.sax.handler.ContentHandler,
|
||||
errorHandler: xml.sax.handler.ErrorHandler=...): ...
|
||||
|
||||
def _create_parser(parser_name: str) -> xml.sax.xmlreader.XMLReader: ...
|
||||
Reference in New Issue
Block a user