Files
openide/python/testData/codeInsight/classMRO/UnresolvedMetaClassAncestors.py
Mikhail Golubev ccbe06603c PY-20026 Add test for the scenario provided by the user
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.
2016-08-19 16:52:42 +03:00

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