mirror of
https://github.com/SELinuxProject/setools
synced 2025-04-11 03:51:26 +00:00
21 lines
431 B
Python
21 lines
431 B
Python
# SPDX-License-Identifier: LGPL-2.1-only
|
|
|
|
import abc
|
|
|
|
from PyQt5 import QtCore
|
|
|
|
QObjectType: type = type(QtCore.QObject)
|
|
|
|
|
|
class MetaclassFix(QObjectType, abc.ABC):
|
|
|
|
"""
|
|
Fix metaclass issues.
|
|
|
|
Use this when doing a Generic[] with a PyQt type. Fixes this error:
|
|
|
|
TypeError: metaclass conflict: the metaclass of a derived class must be a
|
|
(non-strict) subclass of the metaclasses of all its bases
|
|
"""
|
|
pass
|