MCPcopy
hub / github.com/PyGithub/PyGithub / _useAttributes

Method _useAttributes

github/Event.py:111–127  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

109 return self._type.value
110
111 def _useAttributes(self, attributes: dict[str, Any]) -> None:
112 if "actor" in attributes: # pragma no branch
113 self._actor = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["actor"])
114 if "created_at" in attributes: # pragma no branch
115 self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
116 if "id" in attributes: # pragma no branch
117 self._id = self._makeStringAttribute(attributes["id"])
118 if "org" in attributes: # pragma no branch
119 self._org = self._makeClassAttribute(github.Organization.Organization, attributes["org"])
120 if "payload" in attributes: # pragma no branch
121 self._payload = self._makeDictAttribute(attributes["payload"])
122 if "public" in attributes: # pragma no branch
123 self._public = self._makeBoolAttribute(attributes["public"])
124 if "repo" in attributes: # pragma no branch
125 self._repo = self._makeClassAttribute(github.Repository.Repository, attributes["repo"])
126 if "type" in attributes: # pragma no branch
127 self._type = self._makeStringAttribute(attributes["type"])

Callers

nothing calls this directly

Calls 5

_makeClassAttributeMethod · 0.80
_makeStringAttributeMethod · 0.80
_makeDictAttributeMethod · 0.80
_makeBoolAttributeMethod · 0.80

Tested by

no test coverage detected