fixed for real
This commit is contained in:
parent
2c69cab5d5
commit
4c649f90bc
@ -13,10 +13,10 @@ def get_pillar_name_sequence(name: str) -> list[str]:
|
|||||||
|
|
||||||
def decode_pillar_value(pillar: Pillar) -> str | int | float | bool | list | dict:
|
def decode_pillar_value(pillar: Pillar) -> str | int | float | bool | list | dict:
|
||||||
match pillar.parameter_type:
|
match pillar.parameter_type:
|
||||||
case 'string': return str(pillar.value)
|
case 'string': return json.loads(pillar.value)
|
||||||
case 'integer': return int(pillar.value)
|
case 'integer': return json.loads(pillar.value)
|
||||||
case 'float': return float(pillar.value)
|
case 'float': return json.loads(pillar.value)
|
||||||
case 'boolean': return bool(pillar.value)
|
case 'boolean': return json.loads(pillar.value)
|
||||||
case 'list': return json.loads(pillar.value)
|
case 'list': return json.loads(pillar.value)
|
||||||
case 'dict': return json.loads(pillar.value)
|
case 'dict': return json.loads(pillar.value)
|
||||||
raise RuntimeError(f"Failed to decode pillar value: Invalid type '{pillar.parameter_type}'")
|
raise RuntimeError(f"Failed to decode pillar value: Invalid type '{pillar.parameter_type}'")
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "pillartool"
|
name = "pillartool"
|
||||||
version = "0.5.0"
|
version = "0.6.0"
|
||||||
description = "Add your description here"
|
description = "Add your description here"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user