Skip to content

Commit

Permalink
added random-seed validation to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
srezasm committed Aug 30, 2023
1 parent 2e55d9e commit ebc4180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avapix/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def ask_for_random_seed() -> int:
inquirer.Text(
"random_seed",
message="Enter random seed [Enter]",
validate=lambda _, x: x.isdigit() or x == "",
validate=lambda _, x: (x.isdigit() or x == "") and int(x) >= 0 and int(x) <= 255,
),
]
answers = inquirer.prompt(questions)

return answers["random_seed"]
return int(answers["random_seed"])


def ask_for_version() -> str:
Expand Down

0 comments on commit ebc4180

Please sign in to comment.