Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags in output have odict_keys() wrapper #26

Open
AlfredJKwack opened this issue Nov 10, 2024 · 0 comments
Open

Tags in output have odict_keys() wrapper #26

AlfredJKwack opened this issue Nov 10, 2024 · 0 comments

Comments

@AlfredJKwack
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant