2021.4.1 #11

Merged
edraft merged 172 commits from 2021.04.01 into 2021.04 2021-03-21 20:04:24 +01:00
Showing only changes of commit 0522467b76 - Show all commits

View File

@ -103,7 +103,11 @@ class Configuration(ConfigurationABC):
if argument_type.value_token != '' and argument_type.value_token in argument:
# ?new=value
if argument_type.is_value_token_optional is not None and argument_type.is_value_token_optional:
self._additional_arguments.append(argument_type.name)
result = True
if not result:
if argument_type.token != '' and argument.startswith(argument_type.token):
# --new=value
argument_name = argument.split(argument_type.token)[1].split(argument_type.value_token)[0]
@ -121,6 +125,11 @@ class Configuration(ConfigurationABC):
elif argument_type.value_token == ' ':
# ?new value
if argument_type.is_value_token_optional is not None and argument_type.is_value_token_optional:
self._additional_arguments.append(argument_type.name)
result = True
if not result:
if next_arguments is None or len(next_arguments) == 0:
raise Exception(f'Invalid argument: {argument}')