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

Method _useAttributes

github/Authorization.py:170–191  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

168 self._useAttributes(data)
169
170 def _useAttributes(self, attributes: dict[str, Any]) -> None:
171 if "app" in attributes: # pragma no branch
172 self._app = self._makeClassAttribute(
173 github.AuthorizationApplication.AuthorizationApplication,
174 attributes["app"],
175 )
176 if "created_at" in attributes: # pragma no branch
177 self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
178 if "id" in attributes: # pragma no branch
179 self._id = self._makeIntAttribute(attributes["id"])
180 if "note" in attributes: # pragma no branch
181 self._note = self._makeStringAttribute(attributes["note"])
182 if "note_url" in attributes: # pragma no branch
183 self._note_url = self._makeStringAttribute(attributes["note_url"])
184 if "scopes" in attributes: # pragma no branch
185 self._scopes = self._makeListOfStringsAttribute(attributes["scopes"])
186 if "token" in attributes: # pragma no branch
187 self._token = self._makeStringAttribute(attributes["token"])
188 if "updated_at" in attributes: # pragma no branch
189 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
190 if "url" in attributes: # pragma no branch
191 self._url = self._makeStringAttribute(attributes["url"])

Callers 1

editMethod · 0.95

Calls 5

_makeClassAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80
_makeStringAttributeMethod · 0.80

Tested by

no test coverage detected