summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-01-12 15:54:00 +0100
committerChristian Heimes <christian@python.org>2021-01-12 17:44:22 +0100
commit5a928e5f90b58b96a90180bc3c81e293af387ff8 (patch)
treed55d6805dc8e013b3f641b915063c34873a16649
parente1ef14e7dc763fe356f0b6142be23972e4a2310b (diff)
downloaddefusedxml-git-5a928e5f90b58b96a90180bc3c81e293af387ff8.tar.gz
Reformat doc strings with latest black
Signed-off-by: Christian Heimes <christian@python.org>
-rw-r--r--defusedxml/common.py15
-rw-r--r--defusedxml/lxml.py6
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,