

def convert_dict_to_node(self, qdict):
    accum = []
    joins = []
    relationship = (ForeignKeyField, ReverseRelationDescriptor)
    for (key, value) in sorted(qdict.items()):
        curr = self.model_class
        if (('__' in key) and (key.rsplit('__', 1)[1] in DJANGO_MAP)):
            (key, op) = key.rsplit('__', 1)
            op = DJANGO_MAP[op]
        else:
            op = OP.EQ
        for piece in key.split('__'):
            model_attr = getattr(curr, piece)
            if isinstance(model_attr, relationship):
                curr = model_attr.rel_model
                joins.append(model_attr)
        accum.append(Expression(model_attr, value, value))
    return (accum, joins)

dataset/ETHPy150Open coleifer/peewee/peewee.py Query.convert_dict_to_node/VarMisuse@169/210 `op`->`value`