Add files via upload
This commit is contained in:
6
CLI.py
6
CLI.py
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user