Skip to content

Commit

Permalink
add german aliases for yes and no
Browse files Browse the repository at this point in the history
- 'j', 'ja' for yes
- 'nein' for no
  • Loading branch information
wp99cp committed Nov 15, 2021
1 parent 1f98954 commit 6f47e8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python_program/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def generate_automated_walk_table(args: argparse.Namespace):
def str2bool(v):
if isinstance(v, bool):
return v
if v.lower() in ('yes', 'true', 't', 'y', '1'):
if v.lower() in ('yes', 'true', 't', 'y', '1', 'j', 'ja'):
return True
elif v.lower() in ('no', 'false', 'f', 'n', '0'):
elif v.lower() in ('no', 'false', 'f', 'n', '0', 'nein'):
return False
else:
raise argparse.ArgumentTypeError('Boolean value expected.')
Expand Down

0 comments on commit 6f47e8d

Please sign in to comment.