

@classmethod
def _mapper_configured(cls, mapper, class_):
    for mapper_property in mapper.iterate_properties:
        if isinstance(mapper_property, ColumnProperty):
            for (idx, col) in enumerate(mapper_property.columns):
                if isinstance(col.type, UploadedFileField):
                    if (idx > 0):
                        raise TypeError('UploadedFileField currently supports a single column')
                    cls.mapped_entities.setdefault(class_, []).append(mapper_property.key)
                    event.listen(mapper_property, 'set', cls._field_set, retval=True)

dataset/ETHPy150Open amol-/depot/depot/fields/sqlalchemy.py _SQLAMutationTracker._mapper_configured/original