diff options
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | bs4/formatter.py | 4 | ||||
-rw-r--r-- | bs4/tests/test_tree.py | 2 |
3 files changed, 6 insertions, 3 deletions
@@ -12,6 +12,9 @@ Bazaar repository, the final revision to support Python 2 was 605. * Fixed another crash when overriding multi_valued_attributes and using the html5lib parser. [bug=1948488] +* The HTMLFormatter and XMLFormatter constructors no longer return a + value. [bug=1992693] + * Passing a Tag's .contents into PageElement.extend() now works the same way as passing the Tag itself. diff --git a/bs4/formatter.py b/bs4/formatter.py index 65e57b5..83cc1c5 100644 --- a/bs4/formatter.py +++ b/bs4/formatter.py @@ -149,14 +149,14 @@ class HTMLFormatter(Formatter): """A generic Formatter for HTML.""" REGISTRY = {} def __init__(self, *args, **kwargs): - return super(HTMLFormatter, self).__init__(self.HTML, *args, **kwargs) + super(HTMLFormatter, self).__init__(self.HTML, *args, **kwargs) class XMLFormatter(Formatter): """A generic Formatter for XML.""" REGISTRY = {} def __init__(self, *args, **kwargs): - return super(XMLFormatter, self).__init__(self.XML, *args, **kwargs) + super(XMLFormatter, self).__init__(self.XML, *args, **kwargs) # Set up aliases for the default formatters. diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py index f40e764..e456966 100644 --- a/bs4/tests/test_tree.py +++ b/bs4/tests/test_tree.py @@ -913,7 +913,7 @@ class TestTreeModification(SoupTest): @pytest.mark.parametrize( "get_tags", [lambda tag: tag, lambda tag: tag.contents] ) - def test_extend_with_another_tags_contents(self, tags): + def test_extend_with_another_tags_contents(self, get_tags): data = '<body><div id="d1"><a>1</a><a>2</a><a>3</a><a>4</a></div><div id="d2"></div></body>' soup = self.soup(data) d1 = soup.find('div', id='d1') |