diff options
author | Leonard Richardson <leonardr@segfault.org> | 2020-05-30 14:30:58 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2020-05-30 14:30:58 -0400 |
commit | b80c4201fc48617742c49411278b1853fb779a35 (patch) | |
tree | 77f96beb168040db4bc16400c6551041a40055a2 /bs4/builder/__init__.py | |
parent | cbcb02b752c52fb960f734727cc7de2ecb48ed14 (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__.py | 3 |
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) |