I have two classes that look like this:
class BaseClass(object):
def the_dct(self):
return self.THE_DCT
class Kid(BaseClass):
THE_DCT = {'vars': 'values'}
# Code i ll be running
inst = Kid()
print(inst.the_dct)
Inheritance has to be this way; second class containing THE_DCT
and first class containing def the_dct
.
It works just fine, but my problem is that i get a warning in Pycharm (unresolved attribute reference), about THE_DCT
in BaseClass
.
- Is there a reason why it's warning me (as in why i should avoid it)?
- Is there something i should do differently?