|
21 | 21 |
|
22 | 22 | from .xmlreader import InputSource |
23 | 23 | from .handler import ContentHandler, ErrorHandler |
24 | | -from ._exceptions import SAXException, SAXNotRecognizedException, \ |
25 | | - SAXParseException, SAXNotSupportedException, \ |
26 | | - SAXReaderNotAvailable |
| 24 | +from ._exceptions import (SAXException, SAXNotRecognizedException, |
| 25 | + SAXParseException, SAXNotSupportedException, |
| 26 | + SAXReaderNotAvailable) |
27 | 27 |
|
28 | 28 |
|
29 | 29 | def parse(source, handler, errorHandler=ErrorHandler()): |
@@ -55,7 +55,7 @@ def parseString(string, handler, errorHandler=ErrorHandler()): |
55 | 55 | # tell modulefinder that importing sax potentially imports expatreader |
56 | 56 | _false = 0 |
57 | 57 | if _false: |
58 | | - import xml.sax.expatreader |
| 58 | + import xml.sax.expatreader # noqa: F401 |
59 | 59 |
|
60 | 60 | import os, sys |
61 | 61 | if not sys.flags.ignore_environment and "PY_SAX_PARSER" in os.environ: |
@@ -92,3 +92,9 @@ def make_parser(parser_list=()): |
92 | 92 | def _create_parser(parser_name): |
93 | 93 | drv_module = __import__(parser_name,{},{},['create_parser']) |
94 | 94 | return drv_module.create_parser() |
| 95 | + |
| 96 | + |
| 97 | +__all__ = ['ContentHandler', 'ErrorHandler', 'InputSource', 'SAXException', |
| 98 | + 'SAXNotRecognizedException', 'SAXNotSupportedException', |
| 99 | + 'SAXParseException', 'SAXReaderNotAvailable', |
| 100 | + 'default_parser_list', 'make_parser', 'parse', 'parseString'] |
0 commit comments