Format schema

This commit is contained in:
WQY\qiong
2022-10-21 20:31:06 +08:00
parent a3e491091e
commit a48c21f49b
6 changed files with 31 additions and 31 deletions

View File

@@ -12,12 +12,12 @@ VALVES_TYPE_GPV = 'gpv'
def get_valve_schema(name: str) -> dict[str, dict[str, Any]]:
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
'node1' : {'type': "str" , 'optional': False , 'readonly': False},
'node2' : {'type': "str" , 'optional': False , 'readonly': False},
'diameter' : {'type': "float" , 'optional': False , 'readonly': False},
'v_type' : {'type': "str" , 'optional': False , 'readonly': False},
'setting' : {'type': "float" , 'optional': False , 'readonly': False},
'minor_loss' : {'type': "float" , 'optional': False , 'readonly': False} }
'node1' : {'type': 'str' , 'optional': False , 'readonly': False},
'node2' : {'type': 'str' , 'optional': False , 'readonly': False},
'diameter' : {'type': 'float' , 'optional': False , 'readonly': False},
'v_type' : {'type': 'str' , 'optional': False , 'readonly': False},
'setting' : {'type': 'float' , 'optional': False , 'readonly': False},
'minor_loss' : {'type': 'float' , 'optional': False , 'readonly': False} }
def get_valve(name: str, id: str) -> dict[str, Any]: