summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG6
-rw-r--r--bs4/__init__.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 70c6f47..93eb151 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,7 +5,11 @@
no matching opening tag. [bug=1880420]
* Specify the soupsieve dependency in a way that complies with
- PEP 508. Patch by Mike Nerone. [bug=1893696]
+ PEP 508. Patch by Mike Nerone. [bug=1893696]
+
+* Change the signatures for BeautifulSoup.insert_before and insert_after
+ (which are not implemented) to match PageElement.insert_before and
+ insert_after, quieting warnings in some IDEs. [bug=1897120]
= 4.9.1 (20200517)
diff --git a/bs4/__init__.py b/bs4/__init__.py
index a2c839c..73109d6 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -496,13 +496,13 @@ class BeautifulSoup(Tag):
container = self.string_container(subclass)
return container(s)
- def insert_before(self, successor):
+ def insert_before(self, *args):
"""This method is part of the PageElement API, but `BeautifulSoup` doesn't implement
it because there is nothing before or after it in the parse tree.
"""
raise NotImplementedError("BeautifulSoup objects don't support insert_before().")
- def insert_after(self, successor):
+ def insert_after(self, *args):
"""This method is part of the PageElement API, but `BeautifulSoup` doesn't implement
it because there is nothing before or after it in the parse tree.
"""