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

Method _ensure_attribute

praw/models/mod_notes.py:72–77  ·  view source on GitHub ↗
(self, error_message: str, **attributes: Any)

Source from the content-addressed store, hash-verified

70 yield cast("models.ModNote", self._reddit._objector.objectify(data=note_dict))
71
72 def _ensure_attribute(self, error_message: str, **attributes: Any) -> Any:
73 attribute, value_ = attributes.popitem()
74 value = value_ or getattr(self, attribute, None)
75 if value is None:
76 raise TypeError(error_message)
77 return value
78
79 def _notes(
80 self,

Callers 3

createMethod · 0.95
deleteMethod · 0.95

Calls

no outgoing calls

Tested by 1