import inspect
# The base class of all charts import BaseViz
# Global variables globals () All information in the current file, dictionary type; contains classes, variables. . .
# Get the viz_type attribute of all class objects in the current file
viz_line_list = { o.viz_type: o for o in globals().values() if (inspect.isclass(o) and issubclass(o, BaseViz))}
- inspect package
- Subclass determination method