Skip to content

Commit

Permalink
RoundedBox: Fix --top parameter default
Browse files Browse the repository at this point in the history
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 <https://github.com/Korchy>
  • Loading branch information
florianfesti committed Jan 26, 2025
1 parent f98e223 commit e80ad1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boxes/generators/roundedbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e80ad1c

Please sign in to comment.