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

Method _useAttributes

github/AccessToken.py:145–158  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

143 return self._type.value
144
145 def _useAttributes(self, attributes: dict[str, Any]) -> None:
146 self._created = datetime.now(timezone.utc)
147 if "access_token" in attributes: # pragma no branch
148 self._token = self._makeStringAttribute(attributes["access_token"])
149 if "expires_in" in attributes: # pragma no branch
150 self._expires_in = self._makeIntAttribute(attributes["expires_in"])
151 if "refresh_token" in attributes: # pragma no branch
152 self._refresh_token = self._makeStringAttribute(attributes["refresh_token"])
153 if "refresh_token_expires_in" in attributes: # pragma no branch
154 self._refresh_expires_in = self._makeIntAttribute(attributes["refresh_token_expires_in"])
155 if "scope" in attributes: # pragma no branch
156 self._scope = self._makeStringAttribute(attributes["scope"])
157 if "token_type" in attributes: # pragma no branch
158 self._type = self._makeStringAttribute(attributes["token_type"])

Callers

nothing calls this directly

Calls 3

nowMethod · 0.80
_makeStringAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80

Tested by

no test coverage detected