MCPcopy Index your code
hub / github.com/praw-dev/praw / _fetch

Method _fetch

praw/models/reddit/comment.py:193–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

191 return self.link_id.split("_", 1)[1]
192
193 def _fetch(self) -> None:
194 data = self._fetch_data()
195 data = data["data"]
196
197 if not data["children"]:
198 msg = f"No data returned for comment {self.fullname}"
199 raise ClientException(msg)
200
201 comment_data = data["children"][0]["data"]
202 other = type(self)(self._reddit, _data=comment_data)
203 self.__dict__.update(other.__dict__)
204 super()._fetch()
205
206 def _fetch_info(self) -> tuple[str, dict, dict[str, str]]:
207 return "info", {}, {"id": self.fullname}

Callers

nothing calls this directly

Calls 3

ClientExceptionClass · 0.90
_fetch_dataMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected