MCPcopy
hub / github.com/nonebot/nonebot2 / _construct

Method _construct

tests/utils.py:62–68  ·  view source on GitHub ↗
(msg: str | Iterable[Mapping])

Source from the content-addressed store, hash-verified

60 @staticmethod
61 @override
62 def _construct(msg: str | Iterable[Mapping]):
63 if isinstance(msg, str):
64 yield FakeMessageSegment.text(msg)
65 else:
66 for seg in msg:
67 yield FakeMessageSegment(**seg)
68 return
69
70 @override
71 def __add__(self, other: str | FakeMessageSegment | Iterable[FakeMessageSegment]):

Callers

nothing calls this directly

Calls 2

FakeMessageSegmentClass · 0.85
textMethod · 0.80

Tested by

no test coverage detected