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

Method _useAttributes

github/Project.py:242–282  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

240 return github.ProjectColumn.ProjectColumn(self._requester, headers, data)
241
242 def _useAttributes(self, attributes: dict[str, Any]) -> None:
243 if "body" in attributes: # pragma no branch
244 self._body = self._makeStringAttribute(attributes["body"])
245 if "columns_url" in attributes: # pragma no branch
246 self._columns_url = self._makeStringAttribute(attributes["columns_url"])
247 if "created_at" in attributes: # pragma no branch
248 self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
249 if "creator" in attributes: # pragma no branch
250 self._creator = self._makeUnionClassAttributeFromTypeKey(
251 "type",
252 "User",
253 attributes["creator"],
254 (github.NamedUser.NamedUser, "User"),
255 (github.Organization.Organization, "Organization"),
256 )
257 if "html_url" in attributes: # pragma no branch
258 self._html_url = self._makeStringAttribute(attributes["html_url"])
259 if "id" in attributes: # pragma no branch
260 self._id = self._makeIntAttribute(attributes["id"])
261 elif "url" in attributes and attributes["url"]:
262 id = attributes["url"].split("/")[-1]
263 if id.isnumeric():
264 self._id = self._makeIntAttribute(int(id))
265 if "name" in attributes: # pragma no branch
266 self._name = self._makeStringAttribute(attributes["name"])
267 if "node_id" in attributes: # pragma no branch
268 self._node_id = self._makeStringAttribute(attributes["node_id"])
269 if "number" in attributes: # pragma no branch
270 self._number = self._makeIntAttribute(attributes["number"])
271 if "organization_permission" in attributes: # pragma no branch
272 self._organization_permission = self._makeStringAttribute(attributes["organization_permission"])
273 if "owner_url" in attributes: # pragma no branch
274 self._owner_url = self._makeStringAttribute(attributes["owner_url"])
275 if "private" in attributes: # pragma no branch
276 self._private = self._makeBoolAttribute(attributes["private"])
277 if "state" in attributes: # pragma no branch
278 self._state = self._makeStringAttribute(attributes["state"])
279 if "updated_at" in attributes: # pragma no branch
280 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
281 if "url" in attributes: # pragma no branch
282 self._url = self._makeStringAttribute(attributes["url"])

Callers 1

editMethod · 0.95

Calls 5

_makeStringAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80
_makeBoolAttributeMethod · 0.80

Tested by

no test coverage detected