Add files via upload

This commit is contained in:
Fouton
2021-03-12 16:53:08 -05:00
committed by GitHub
parent 2a1eb07d73
commit 0865288581

6
CLI.py
View File

@@ -16,6 +16,7 @@ class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
def _get_help_string(self, action):
return textwrap.dedent(action.help)
def parse_cli(argv, no_defaults=False):
def defval(value):
return value if not no_defaults else None
@@ -109,8 +110,8 @@ def parse_cli(argv, no_defaults=False):
getattr(ret, name)[player] = value
return ret
def apply_settings_file(settings, settings_path):
if os.path.exists(settings_path):
with open(settings_path) as json_file:
@@ -120,7 +121,6 @@ def apply_settings_file(settings, settings_path):
return settings
def parse_settings():
# set default settings
settings = {