Open tgross35 opened 3 years ago
This is also true when using the example Mixin from the official documentation:
@declarative_mixin
class MyMixin:
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
__table_args__ = {'mysql_engine': 'InnoDB'}
__mapper_args__ = {'always_refresh': True}
id = Column(Integer, primary_key=True)
This example is marked with Method should have 'self' as first argument
.
I've experienced this with SQLA's declared_attr decorator. I'm assuming that other "classmethod-like" decorators would also run into the same issue.
Results in: