From e80ad1c42ac500a3ae6cecb0d767f7f0c3ab3109 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sun, 26 Jan 2025 10:36:18 +0100 Subject: [PATCH] RoundedBox: Fix --top parameter default In the --top parameter of the roundedbox generator the value of "none" is set as the default value, but is not included in the choices list. So the argparse exists with the error app.py: error: argument --top: invalid choice: 'none' (choose from 'closed', 'hole', 'lid') if the default "none" value is used when calling the generator execution. Co-authored-by: Nikita Akimov --- boxes/generators/roundedbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boxes/generators/roundedbox.py b/boxes/generators/roundedbox.py index 5005f22d..78c9c8aa 100644 --- a/boxes/generators/roundedbox.py +++ b/boxes/generators/roundedbox.py @@ -49,8 +49,8 @@ def __init__(self) -> None: default="f", help="edge type for top and bottom edges") self.argparser.add_argument( - "--top", action="store", type=str, default="none", - choices=["closed", "hole", "lid",], + "--top", action="store", type=str, default="hole", + choices=["hole", "lid", "closed",], help="style of the top and lid") def hole(self):