mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
__import__(name, ..., fromlist, ...) always returns the top-level package if `import x.y.z` is used (here `x`), and the module given by `name` if `from x.y.z import a` is used, here `x.y.z`. Differentiating between these two cases can be done by looking at the `fromlist` argument. By not tracking modules correctly, plugin unloading/reloading was broken if a module hierarchy within a plugin was used and `from` was not exclusively used.