MCPcopy Create free account
hub / github.com/ddnet/ddnet / parse

Method parse

scripts/integration_test.py:28–39  ·  view source on GitHub ↗
(cls, line)

Source from the content-addressed store, hash-verified

26class Log(namedtuple("Log", "timestamp level line")):
27 @classmethod
28 def parse(cls, line):
29 if line.startswith("=="):
30 pid, line = line[2:].split("== ", 1)
31 return cls(None, "valgrind", f"{pid}: {line}")
32 elif not line.startswith("["):
33 # DDNet log
34 date, time, level, line = line.split(" ", 3)
35 return cls(f"{date} {time}", level, line)
36 else:
37 # Rust log
38 datetime, level, line = line.split(" ", 2)
39 return cls(datetime.removeprefix("["), level, line.removeprefix(" ").replace("]", ":", 1))
40
41 def raise_on_error(self, timeout_id):
42 pass

Callers 7

from_configMethod · 0.45
parse_optFunction · 0.45
mainFunction · 0.45
verificationFunction · 0.45
from_strMethod · 0.45
threadFunction · 0.45
process_source_fileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected