MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / _useAttributes

Method _useAttributes

github/CommitStatus.py:138–168  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

136 return self._url.value
137
138 def _useAttributes(self, attributes: dict[str, Any]) -> None:
139 if "avatar_url" in attributes: # pragma no branch
140 self._avatar_url = self._makeStringAttribute(attributes["avatar_url"])
141 if "context" in attributes: # pragma no branch
142 self._context = self._makeStringAttribute(attributes["context"])
143 if "created_at" in attributes: # pragma no branch
144 self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
145 if "creator" in attributes: # pragma no branch
146 self._creator = self._makeUnionClassAttributeFromTypeKey(
147 "type",
148 "User",
149 attributes["creator"],
150 (github.NamedUser.NamedUser, "User"),
151 (github.Organization.Organization, "Organization"),
152 )
153 if "description" in attributes: # pragma no branch
154 self._description = self._makeStringAttribute(attributes["description"])
155 if "id" in attributes: # pragma no branch
156 self._id = self._makeIntAttribute(attributes["id"])
157 if "node_id" in attributes: # pragma no branch
158 self._node_id = self._makeStringAttribute(attributes["node_id"])
159 if "required" in attributes: # pragma no branch
160 self._required = self._makeBoolAttribute(attributes["required"])
161 if "state" in attributes: # pragma no branch
162 self._state = self._makeStringAttribute(attributes["state"])
163 if "target_url" in attributes: # pragma no branch
164 self._target_url = self._makeStringAttribute(attributes["target_url"])
165 if "updated_at" in attributes: # pragma no branch
166 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
167 if "url" in attributes: # pragma no branch
168 self._url = self._makeStringAttribute(attributes["url"])

Callers

nothing calls this directly

Calls 5

_makeStringAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80
_makeBoolAttributeMethod · 0.80

Tested by

no test coverage detected