mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 12:14:10 +08:00
bc86b73bbe
python-fire auto-converts `item1,item2` into a tuple, but if there is a dash `-` inside the argument, it treats it as a string. Let's validate the data, when it comes as a `str` or `tuple`. For more details, here are the tested scenarios: | --lava-tags= | Type | Value | |--------------|-------|---------------------| | None | bool | True | | '' | str | '' | | tag1 | str | "tag1" | | tag1, | tuple | ("tag1",) | | tag-1,tag-2 | str | 'tag-1,tag-2' | | tag1,tag2 | tuple | ("tag1", "tag2") | | ',' | str | ',' | | ',,' | str | ',,' | | 'tag1,,' | str | 'tag1,,' | See also: https://google.github.io/python-fire/guide/#argument-parsing Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882> |
||
---|---|---|
.. | ||
utils | ||
__init__.py | ||
exceptions.py | ||
lava_job_submitter.py | ||
lava-gitlab-ci.yml | ||
lava-submit.sh |