How to use the yq.operators.dot.Dot function in yq

To help you get started, we’ve selected a few yq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github abesto / yq / yq / operators / projection.py View on Github external
def __repr__(self):
        str_items = []
        for item in self.items:
            if isinstance(item.op, Dot) and item.op.key == item.key:
                str_items.append(item.key)
            else:
                str_items.append('%s: %s' % (item.key, item.op))
        return '{' + ', '.join(str_items) + '}'
github abesto / yq / yq / parser.py View on Github external
    key().setParseAction(lambda ts: ProjectionItem(ts[0], Dot(ts[0])))
).setName('projection_item')