Skip comment
This commit is contained in:
@@ -138,6 +138,9 @@ class InpJunction:
|
||||
def inp_in_junction(section: list[str]) -> ChangeSet:
|
||||
cs = ChangeSet()
|
||||
for s in section:
|
||||
# skip comment
|
||||
if s.startswith(';'):
|
||||
continue
|
||||
obj = InpJunction(s)
|
||||
cs.append({'operation': API_ADD, 'type': 'junction', 'id': obj.id, 'elevation': obj.elevation, 'demand': obj.demand, 'pattern': obj.pattern})
|
||||
return cs
|
||||
|
||||
@@ -133,6 +133,9 @@ class InpReservoir:
|
||||
def inp_in_reservoir(section: list[str]) -> ChangeSet:
|
||||
cs = ChangeSet()
|
||||
for s in section:
|
||||
# skip comment
|
||||
if s.startswith(';'):
|
||||
continue
|
||||
obj = InpReservoir(s)
|
||||
cs.append({'operation': API_ADD, 'type': 'reservoir', 'id': obj.id, 'head': obj.head, 'pattern': obj.pattern})
|
||||
return cs
|
||||
|
||||
@@ -167,6 +167,9 @@ class InpTank:
|
||||
def inp_in_tank(section: list[str]) -> ChangeSet:
|
||||
cs = ChangeSet()
|
||||
for s in section:
|
||||
# skip comment
|
||||
if s.startswith(';'):
|
||||
continue
|
||||
obj = InpTank(s)
|
||||
cs.append({'operation': API_ADD, 'type': 'tank', 'id': obj.id, 'elevation': obj.elevation, 'init_level': obj.init_level, 'min_level': obj.min_level, 'max_level': obj.max_level, 'diameter': obj.diameter, 'min_vol': obj.min_vol, 'vol_curve': obj.vol_curve, 'overflow': obj.overflow})
|
||||
return cs
|
||||
|
||||
@@ -146,6 +146,9 @@ class InpPipe:
|
||||
def inp_in_pipe(section: list[str]) -> ChangeSet:
|
||||
cs = ChangeSet()
|
||||
for s in section:
|
||||
# skip comment
|
||||
if s.startswith(';'):
|
||||
continue
|
||||
obj = InpPipe(s)
|
||||
cs.append({'operation': API_ADD, 'type': 'pipe', 'id': obj.id, 'node1': obj.node1, 'node2': obj.node2, 'length': obj.length, 'diameter': obj.diameter, 'roughness': obj.roughness, 'minor_loss': obj.minor_loss, 'status': obj.status})
|
||||
return cs
|
||||
|
||||
Reference in New Issue
Block a user