Skip to content

Tags in output have odict_keys() wrapper #26

@AlfredJKwack

Description

@AlfredJKwack

Currently running something like pockyt get -n 5 -f '{id} | {tags}'

Will produce output like

64845519 | odict_keys(['hack'])
2872686492 | odict_keys(['developper', 'work'])
3990014513 | odict_keys(['coding', 'macos'])
4047586147 | odict_keys(['newjob'])
4129533492 | odict_keys(['developper', 'work'])

That odict_keys() bit is a bit ugly ain't it 😇

The easy fix is that would be to convert the odict_keys object to a list like so.

client.py L173-L175

    def _process_tags(self, tags):
        if tags:
            return list(tags.keys())

Then the output is a more palatable:

64845519 | ['hack']
2872686492 | ['developper', 'work']
3990014513 | ['coding', 'macos']
4047586147 | ['newjob']
4129533492 | ['developper', 'work']

A PR can be forthcoming of course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions