MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / _tail

Function _tail

scripts/smoke_startup_check.py:21–26  ·  view source on GitHub ↗
(path: Path, lines: int = 80)

Source from the content-addressed store, hash-verified

19
20
21def _tail(path: Path, lines: int = 80) -> str:
22 try:
23 content = path.read_text(encoding="utf-8", errors="replace").splitlines()
24 except OSError as exc:
25 return f"Unable to read smoke log: {exc}"
26 return "\n".join(content[-lines:])
27
28
29def _is_ready() -> bool:

Callers 1

mainFunction · 0.85

Calls 1

read_textMethod · 0.45

Tested by

no test coverage detected