Reduce dependency

This commit is contained in:
Joey Wang
2023-03-09 12:55:08 +08:00
parent d2d27c2ce0
commit a2e4649be5

View File

@@ -1,7 +1,7 @@
from .project import *
from .database import get_current_operation, set_restore_operation
from .database import ChangeSet, get_current_operation, set_restore_operation
from .sections import section_name
from .batch_cmds import *
from .batch_cmds import execute_batch_commands
from .s1_title import inp_in_title
from .s2_junctions import inp_in_junction
from .s3_reservoirs import inp_in_reservoir
@@ -42,7 +42,7 @@ def _parse_inp(inp: str) -> dict[str, list[str]]:
for line in open(inp):
line = line.strip()
if line == '':
# skip empty line for control and rule
# skip empty line for control and rule
if section == 'CONTROLS' or section == 'RULES':
pass
else:
@@ -168,7 +168,7 @@ def _read_inp(file: dict[str, list[str]]) -> ChangeSet:
file_cs[name].merge(inp_in_time(section))
elif name == 'REPORT':
pass # ignore now, for simulation, always report all
file_cs[name].merge(inp_in_report(section))
elif name == 'OPTIONS':
file_cs[name].merge(inp_in_option(section))