def _get_all_imports():
"""
Return list of all the imports
This prevents sub-modules (geoms, stats, utils, ...)
from being imported into the user namespace by the
following import statement
from plotnine import *
This is because `from Module import Something`
leads to `Module` itself coming into the namespace!!
"""
import types
lst = [name for name, obj in globals().items()
if not (name.startswith('_') or
name == 'absolute_import' or
isinstance(obj, types.ModuleType))]
return lst
评论列表
文章目录