Skip to content

Commit

Permalink
Reformat doc strings with latest black
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <christian@python.org>
  • Loading branch information
tiran committed Jan 12, 2021
1 parent e1ef14e commit 5a928e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
15 changes: 5 additions & 10 deletions defusedxml/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@


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__()
Expand All @@ -41,8 +39,7 @@ def __str__(self):


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__()
Expand All @@ -59,8 +56,7 @@ def __str__(self):


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__()
Expand All @@ -75,8 +71,7 @@ def __str__(self):


class NotSupportedError(DefusedXmlException):
"""The operation is not supported
"""
"""The operation is not supported"""


def _apply_defusing(defused_mod):
Expand Down
6 changes: 2 additions & 4 deletions defusedxml/lxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@


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)
Expand Down Expand Up @@ -75,8 +74,7 @@ def getiterator(self, tag=None):


class GlobalParserTLS(threading.local):
"""Thread local context for custom parser instances
"""
"""Thread local context for custom parser instances"""

parser_config = {
"resolve_entities": False,
Expand Down

0 comments on commit 5a928e5

Please sign in to comment.