Skip to content

Tolerate description=None and make cli debuggable #34

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dalito
Copy link

@dalito dalito commented Mar 30, 2023

Normally the github-API returns for an empty description "description"="". But in rare occasions it returns for an empty description "description"=None. The value None causes an error when writing the toml-file (TypeError: Object of type <class 'NoneType'> is not TOML serializable). A description value of None may results from adding labels via the github-API with other tools (in my case piceaTech/node-gitlab-2-github). - This PR adds auto-conversion of None to "" to avoid the problem.

This PR also adds if __name__ == "__main__": ... to cli.py to enable running the script in the debugger via python -m pdb src/labels/cli.py.

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

Successfully merging this pull request may close these issues.

1 participant