Closed apirogov closed 2 years ago
Thank you for the report!
@apirogov tested with overrides 7.0.0. This works.
from overrides import EnforceOverrides, overrides
class SuperClass(EnforceOverrides):
class Inner:
test = 123
class Child(SuperClass):
@overrides
class Inner:
field = "hello world"
Seems that last version that did not work was 6.2.0. Based on this I'm closing this bug.
Ah, my bad, I will upgrade then :) Thanks!
results in:
Adding the
@overrides
decorator toInner
then leads toIn my opinion, inner classes and other "complicated entities" that are not normal methods etc. should probably be simply ignored as a fix for this issue.
There is not much that could be easily checked (apart from maybe that the inner class inherits from certain base classes / metaclass that can do further checks), but in any case that would be probably be something for another issue / feature request.