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

Method write

astrbot/core/utils/pip_installer.py:209–219  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

207 self._buffer = ""
208
209 def write(self, text: str) -> int:
210 if not text:
211 return 0
212
213 self._buffer += text.replace("\r\n", "\n").replace("\r", "\n")
214 while "\n" in self._buffer:
215 raw_line, self._buffer = self._buffer.split("\n", 1)
216 line = raw_line.rstrip("\r\n")
217 self._log_func(line)
218 self._lines.append(line)
219 return len(text)
220
221 def flush(self) -> None:
222 line = self._buffer.rstrip("\r\n")

Callers 15

_download_fileMethod · 0.45
save_temp_imgFunction · 0.45
download_image_by_urlFunction · 0.45
wav_to_tencent_silkFunction · 0.45
get_installation_idMethod · 0.45
constraints_fileMethod · 0.45
create_templateMethod · 0.45
update_templateMethod · 0.45
put_configFunction · 0.45
_save_mediaMethod · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected