From 810654aca08d74f0a50373d97af88862db269fd3 Mon Sep 17 00:00:00 2001 From: David Linke Date: Thu, 30 Mar 2023 16:08:33 +0200 Subject: [PATCH 1/2] Make cli script debugable --- src/labels/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/labels/cli.py b/src/labels/cli.py index e5f0d69..e031967 100644 --- a/src/labels/cli.py +++ b/src/labels/cli.py @@ -281,3 +281,7 @@ def dryrun_echo( click.echo("This would NOT modify the following labels:") for name in labels_to_ignore: click.echo(f" - {name}") + + +if __name__ == '__main__': + labels() From 67468315e041b2d8b307cb134faa05e618516472 Mon Sep 17 00:00:00 2001 From: David Linke Date: Thu, 30 Mar 2023 16:09:51 +0200 Subject: [PATCH 2/2] Fix handling of description-value of None --- src/labels/github.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/labels/github.py b/src/labels/github.py index 12c9cf1..6512147 100644 --- a/src/labels/github.py +++ b/src/labels/github.py @@ -26,7 +26,10 @@ class Label: color: str name: str - description: str = "" + description: str = attr.field( + default="", + converter=attr.converters.default_if_none("") + ) # Read-only attributes _default: bool = False