Files
openide/python/testData/inspections/PyUnresolvedReferencesInspection/metaClassMembers.py

17 lines
327 B
Python

class GenericMeta(type):
def __getitem__(self, args):
pass
class Generic(object):
__metaclass__ = GenericMeta
class C(Generic['foo']):
pass
print(C['bar'])
c = C()
print(c<warning descr="Class 'C' does not define '__getitem__', so the '[]' operator cannot be used on its instances">[</warning>'baz'])