diff options
-rw-r--r-- | defusedxml/common.py | 15 | ||||
-rw-r--r-- | defusedxml/lxml.py | 6 |
2 files changed, 7 insertions, 14 deletions
diff --git a/defusedxml/common.py b/defusedxml/common.py index dd750ab..4bd573a 100644 --- a/defusedxml/common.py +++ b/defusedxml/common.py @@ -18,16 +18,14 @@ if not hasattr(xml.parsers.expat, "ParserCreate"): class DefusedXmlException(ValueError): - """Base exception - """ + """Base exception""" def __repr__(self): return str(self) class DTDForbidden(DefusedXmlException): - """Document type definition is forbidden - """ + """Document type definition is forbidden""" def __init__(self, name, sysid, pubid): super(DTDForbidden, self).__init__() @@ -41,8 +39,7 @@ class DTDForbidden(DefusedXmlException): class EntitiesForbidden(DefusedXmlException): - """Entity definition is forbidden - """ + """Entity definition is forbidden""" def __init__(self, name, value, base, sysid, pubid, notation_name): super(EntitiesForbidden, self).__init__() @@ -59,8 +56,7 @@ class EntitiesForbidden(DefusedXmlException): class ExternalReferenceForbidden(DefusedXmlException): - """Resolving an external reference is forbidden - """ + """Resolving an external reference is forbidden""" def __init__(self, context, base, sysid, pubid): super(ExternalReferenceForbidden, self).__init__() @@ -75,8 +71,7 @@ class ExternalReferenceForbidden(DefusedXmlException): class NotSupportedError(DefusedXmlException): - """The operation is not supported - """ + """The operation is not supported""" def _apply_defusing(defused_mod): diff --git a/defusedxml/lxml.py b/defusedxml/lxml.py index 1320ca5..ec22e0c 100644 --- a/defusedxml/lxml.py +++ b/defusedxml/lxml.py @@ -31,8 +31,7 @@ warnings.warn( class RestrictedElement(_etree.ElementBase): - """A restricted Element class that filters out instances of some classes - """ + """A restricted Element class that filters out instances of some classes""" __slots__ = () # blacklist = (etree._Entity, etree._ProcessingInstruction, etree._Comment) @@ -75,8 +74,7 @@ class RestrictedElement(_etree.ElementBase): class GlobalParserTLS(threading.local): - """Thread local context for custom parser instances - """ + """Thread local context for custom parser instances""" parser_config = { "resolve_entities": False, |