Skip to content

Commit

Permalink
Fix style.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed Nov 5, 2021
1 parent 72e3485 commit b1867d7
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions examples/singularity/singularity-parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def coverage(content, props):

def unsolvable(content, props):
# Note that this naive test may easily generate false positives.
props["unsolvable"] = int("Completely explored state space -- no solution!" in content)
props["unsolvable"] = int(
"Completely explored state space -- no solution!" in content
)


def parse_g_value_over_time(content, props):
Expand All @@ -32,11 +34,11 @@ def set_outcome(content, props):
# runsolver decides "out of time" based on CPU rather than (cumulated)
# WCTIME.
if (
not solved and
not unsolvable and
not out_of_time and
not out_of_memory and
props["runtime"] > props["time_limit"]
not solved
and not unsolvable
and not out_of_time
and not out_of_memory
and props["runtime"] > props["time_limit"]
):
out_of_time = 1
# In cases where CPU time is very slightly above the threshold so that
Expand Down Expand Up @@ -90,8 +92,12 @@ def main():
)
parser.add_pattern("runtime", r"Singularity runtime: (.+?)s", type=float)
parser.add_pattern(
"time_limit", r"Enforcing CPUTime limit \(soft limit, will send SIGTERM then SIGKILL\): (\d+) seconds",
type=int, file="watch.log", required=True
"time_limit",
r"Enforcing CPUTime limit \(soft limit, will send "
r"SIGTERM then SIGKILL\): (\d+) seconds",
type=int,
file="watch.log",
required=True,
)
# Cumulative runtime and virtual memory of the solver and all child processes.
parser.add_pattern(
Expand Down

0 comments on commit b1867d7

Please sign in to comment.