【发布时间】:2019-05-17 23:19:48
【问题描述】:
我正在为我的项目在 python 2.7 中生成 sphinx 1.8 文档。 我有一个继承三个类的类:
class Meta(type(QtGui.QWidget), type(BaseClass)):
pass
class UI(QWidget, BaseClass, BaseWidget)
__metaclass__ = Meta
def __init__(self):
QtGui.QWidget.__init__(self)
BaseClass.__init__(self)
BaseWidget.__init__(self)
Python 应用程序没有错误。
但是使用 sphinx 1.8,会产生以下错误: TypeError:元类冲突:派生类的元类必须是其所有基类的元类的(非严格)子类。
有人可以帮忙吗?
【问题讨论】:
标签: python python-2.7 python-sphinx metaclass