Guard coding for ";" line
This commit is contained in:
@@ -135,6 +135,9 @@ def inp_in_energy(section: list[str]) -> ChangeSet:
|
|||||||
cs = ChangeSet()
|
cs = ChangeSet()
|
||||||
|
|
||||||
for s in section:
|
for s in section:
|
||||||
|
if s.startswith(';'):
|
||||||
|
continue
|
||||||
|
|
||||||
tokens = s.strip().split()
|
tokens = s.strip().split()
|
||||||
|
|
||||||
if tokens[0].upper() == 'PUMP':
|
if tokens[0].upper() == 'PUMP':
|
||||||
|
|||||||
@@ -185,6 +185,9 @@ def inp_in_reaction(section: list[str]) -> ChangeSet:
|
|||||||
cs = ChangeSet()
|
cs = ChangeSet()
|
||||||
|
|
||||||
for s in section:
|
for s in section:
|
||||||
|
if s.startswith(';'):
|
||||||
|
continue
|
||||||
|
|
||||||
tokens = s.strip().split()
|
tokens = s.strip().split()
|
||||||
token0 = tokens[0].upper()
|
token0 = tokens[0].upper()
|
||||||
if token0 == 'BULK' or token0 == 'WALL':
|
if token0 == 'BULK' or token0 == 'WALL':
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ def set_time(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
def inp_in_time(section: list[str]) -> ChangeSet:
|
def inp_in_time(section: list[str]) -> ChangeSet:
|
||||||
cs = g_update_prefix | { 'type' : 'time' }
|
cs = g_update_prefix | { 'type' : 'time' }
|
||||||
for s in section:
|
for s in section:
|
||||||
|
if s.startswith(';'):
|
||||||
|
continue
|
||||||
|
|
||||||
line = s.upper().strip()
|
line = s.upper().strip()
|
||||||
for key in get_time_schema('').keys():
|
for key in get_time_schema('').keys():
|
||||||
if line.startswith(key):
|
if line.startswith(key):
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ def set_option(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
def inp_in_option(section: list[str]) -> ChangeSet:
|
def inp_in_option(section: list[str]) -> ChangeSet:
|
||||||
cs = g_update_prefix | { 'type' : 'option' }
|
cs = g_update_prefix | { 'type' : 'option' }
|
||||||
for s in section:
|
for s in section:
|
||||||
|
if s.startswith(';'):
|
||||||
|
continue
|
||||||
|
|
||||||
line = s.upper().strip()
|
line = s.upper().strip()
|
||||||
for key in get_option_schema('').keys():
|
for key in get_option_schema('').keys():
|
||||||
if line.startswith(key):
|
if line.startswith(key):
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ def inp_in_vertex(section: list[str]) -> ChangeSet:
|
|||||||
vertices: dict[str, list[dict[str, float]]] = {}
|
vertices: dict[str, list[dict[str, float]]] = {}
|
||||||
|
|
||||||
for s in section:
|
for s in section:
|
||||||
|
if s.startswith(';'):
|
||||||
|
continue
|
||||||
|
|
||||||
tokens = s.split()
|
tokens = s.split()
|
||||||
if tokens[0] not in vertices:
|
if tokens[0] not in vertices:
|
||||||
vertices[tokens[0]] = []
|
vertices[tokens[0]] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user