Format api file
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
import api
|
import api
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# enum
|
||||||
|
############################################################
|
||||||
|
|
||||||
JUNCTION = "JUNCTION"
|
JUNCTION = "JUNCTION"
|
||||||
RESERVOIR = "RESERVOIR"
|
RESERVOIR = "RESERVOIR"
|
||||||
TANK = "TANK"
|
TANK = "TANK"
|
||||||
@@ -7,7 +12,10 @@ PIPE = "PIPE"
|
|||||||
PUMP = "PUMP"
|
PUMP = "PUMP"
|
||||||
VALVE = "VALVE"
|
VALVE = "VALVE"
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
# project
|
# project
|
||||||
|
############################################################
|
||||||
|
|
||||||
def have_project(name: str) -> bool:
|
def have_project(name: str) -> bool:
|
||||||
return api.have_project(name)
|
return api.have_project(name)
|
||||||
@@ -27,7 +35,10 @@ def open_project(name: str) -> None:
|
|||||||
def close_project(name: str) -> None:
|
def close_project(name: str) -> None:
|
||||||
return api.close_project(name)
|
return api.close_project(name)
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
# operation
|
# operation
|
||||||
|
############################################################
|
||||||
|
|
||||||
def undo(name: str) -> None:
|
def undo(name: str) -> None:
|
||||||
return api.undo(name)
|
return api.undo(name)
|
||||||
@@ -35,7 +46,10 @@ def undo(name: str) -> None:
|
|||||||
def redo(name: str) -> None:
|
def redo(name: str) -> None:
|
||||||
return api.redo(name)
|
return api.redo(name)
|
||||||
|
|
||||||
# 0.base
|
|
||||||
|
############################################################
|
||||||
|
# type
|
||||||
|
############################################################
|
||||||
|
|
||||||
def is_node(name: str, node_id: str) -> bool:
|
def is_node(name: str, node_id: str) -> bool:
|
||||||
return api.is_node(name, node_id)
|
return api.is_node(name, node_id)
|
||||||
@@ -67,14 +81,22 @@ def is_curve(name: str, curve_id: str) -> bool:
|
|||||||
def is_pattern(name: str, pattern_id: str) -> bool:
|
def is_pattern(name: str, pattern_id: str) -> bool:
|
||||||
return api.is_pattern(name, pattern_id)
|
return api.is_pattern(name, pattern_id)
|
||||||
|
|
||||||
# 1.title
|
|
||||||
|
############################################################
|
||||||
|
# title 1.[TITLE]
|
||||||
|
############################################################
|
||||||
|
|
||||||
def set_title(name: str, title: str) -> None:
|
def set_title(name: str, title: str) -> None:
|
||||||
return api.set_title(name, title)
|
return api.set_title(name, title)
|
||||||
|
|
||||||
def get_title(name: str) -> str:
|
def get_title(name: str) -> str:
|
||||||
return api.get_title(name)
|
return api.get_title(name)
|
||||||
|
|
||||||
# 2.junction
|
|
||||||
|
############################################################
|
||||||
|
# junction 2.[JUNCTIONS]
|
||||||
|
############################################################
|
||||||
|
|
||||||
def add_junction(name: str, junction_id: str, x: float, y: float, elevation: float) -> None:
|
def add_junction(name: str, junction_id: str, x: float, y: float, elevation: float) -> None:
|
||||||
return api.add_junction(name, junction_id, x, y, elevation)
|
return api.add_junction(name, junction_id, x, y, elevation)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user