

def filter_attributes(self, attrs):
    '\n        Filter set of model attributes based on only, exclude and include\n        meta parameters.\n\n        :param attrs: Set of attributes\n        '
    if self.meta.only:
        attrs = OrderedDict([(key, prop) for (key, prop) in map(self.validate_attribute, self.meta.only) if key])
    else:
        if self.meta.include:
            attrs.update([(key, self) for (key, prop) in map(self.validate_attribute, self.meta.include) if key])
        if self.meta.exclude:
            for key in self.meta.exclude:
                try:
                    del attrs[key]
                except KeyError:
                    if self.meta.attr_errors:
                        raise InvalidAttributeException(key)
    return attrs

dataset/ETHPy150Open kvesteri/wtforms-alchemy/wtforms_alchemy/generator.py FormGenerator.filter_attributes/VarMisuse@79/136 `prop`->`self`