mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
The problem itself has been already remedied by the previous fix, nonetheless, the example given by the user provides an interesting case where we can encounter duplicate base classes in practice, since we are not able to find out result of type(SomeClass) expression yet.
28 lines
613 B
Python
28 lines
613 B
Python
# --- TypeField ---
|
|
|
|
class TypeFieldMeta(type):
|
|
pass
|
|
|
|
|
|
class TypeField(metaclass=TypeFieldMeta):
|
|
pass
|
|
|
|
|
|
# --- FieldedType ---
|
|
|
|
class FieldedTypeMeta(type):
|
|
pass
|
|
|
|
|
|
class FieldedType(metaclass=FieldedTypeMeta):
|
|
pass
|
|
|
|
|
|
# --- CompositeField ---
|
|
|
|
class CompositeFieldMeta(type(FieldedType), type(TypeField)):
|
|
# The superclass declaration is spelled they way it is to true and isolate this bit of code
|
|
# from the implementation details of whether or not FieldedType and TypeField have special
|
|
# metaclasses of their own or not and still get a metaclass MRO that keeps Python happy.
|
|
pass
|