2021.4 #19

Merged
edraft merged 237 commits from 2021.4 into master 2021-04-01 10:13:33 +02: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: if argument_type.value_token != '' and argument_type.value_token in argument:
# ?new=value # ?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): if argument_type.token != '' and argument.startswith(argument_type.token):
# --new=value # --new=value
argument_name = argument.split(argument_type.token)[1].split(argument_type.value_token)[0] 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 == ' ': elif argument_type.value_token == ' ':
# ?new value # ?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: if next_arguments is None or len(next_arguments) == 0:
raise Exception(f'Invalid argument: {argument}') raise Exception(f'Invalid argument: {argument}')