summaryrefslogtreecommitdiff
path: root/bs4/builder/__init__.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2020-05-30 14:30:58 -0400
committerLeonard Richardson <leonardr@segfault.org>2020-05-30 14:30:58 -0400
commitb80c4201fc48617742c49411278b1853fb779a35 (patch)
tree77f96beb168040db4bc16400c6551041a40055a2 /bs4/builder/__init__.py
parentcbcb02b752c52fb960f734727cc7de2ecb48ed14 (diff)
Remove explicit reference to the module name within the module, replacing it with __name__.
Diffstat (limited to 'bs4/builder/__init__.py')
-rw-r--r--bs4/builder/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py
index e319625..03da4c6 100644
--- a/bs4/builder/__init__.py
+++ b/bs4/builder/__init__.py
@@ -476,8 +476,7 @@ class HTMLTreeBuilder(TreeBuilder):
def register_treebuilders_from(module):
"""Copy TreeBuilders from the given module into this module."""
- # I'm fairly sure this is not the best way to do this.
- this_module = sys.modules['bs4.builder']
+ this_module = sys.modules[__name__]
for name in module.__all__:
obj = getattr(module, name)