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

Method _useAttributes

github/Team.py:528–586  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

526 )
527
528 def _useAttributes(self, attributes: dict[str, Any]) -> None:
529 if "created_at" in attributes: # pragma no branch
530 self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
531 if "description" in attributes: # pragma no branch
532 self._description = self._makeStringAttribute(attributes["description"])
533 if "enterprise_id" in attributes: # pragma no branch
534 self._enterprise_id = self._makeIntAttribute(attributes["enterprise_id"])
535 if "group_id" in attributes: # pragma no branch
536 self._group_id = self._makeIntAttribute(attributes["group_id"])
537 if "group_name" in attributes: # pragma no branch
538 self._group_name = self._makeStringAttribute(attributes["group_name"])
539 if "html_url" in attributes:
540 self._html_url = self._makeStringAttribute(attributes["html_url"])
541 if "id" in attributes: # pragma no branch
542 self._id = self._makeIntAttribute(attributes["id"])
543 elif "url" in attributes and attributes["url"]:
544 id = attributes["url"].split("/")[-1]
545 if id.isnumeric():
546 self._id = self._makeIntAttribute(int(id))
547 if "ldap_dn" in attributes: # pragma no branch
548 self._ldap_dn = self._makeStringAttribute(attributes["ldap_dn"])
549 if "members_count" in attributes: # pragma no branch
550 self._members_count = self._makeIntAttribute(attributes["members_count"])
551 if "members_url" in attributes: # pragma no branch
552 self._members_url = self._makeStringAttribute(attributes["members_url"])
553 if "name" in attributes: # pragma no branch
554 self._name = self._makeStringAttribute(attributes["name"])
555 if "node_id" in attributes: # pragma no branch
556 self._node_id = self._makeStringAttribute(attributes["node_id"])
557 if "notification_setting" in attributes: # pragma no branch
558 self._notification_setting = self._makeStringAttribute(attributes["notification_setting"])
559 if "organization" in attributes: # pragma no branch
560 self._organization = self._makeClassAttribute(github.Organization.Organization, attributes["organization"])
561 if "organization_id" in attributes: # pragma no branch
562 self._organization_id = self._makeIntAttribute(attributes["organization_id"])
563 if "organization_selection_type" in attributes: # pragma no branch
564 self._organization_selection_type = self._makeStringAttribute(attributes["organization_selection_type"])
565 if "parent" in attributes: # pragma no branch
566 self._parent = self._makeClassAttribute(github.Team.Team, attributes["parent"])
567 if "permission" in attributes: # pragma no branch
568 self._permission = self._makeStringAttribute(attributes["permission"])
569 if "permissions" in attributes: # pragma no branch
570 self._permissions = self._makeClassAttribute(github.Permissions.Permissions, attributes["permissions"])
571 if "privacy" in attributes: # pragma no branch
572 self._privacy = self._makeStringAttribute(attributes["privacy"])
573 if "repos_count" in attributes: # pragma no branch
574 self._repos_count = self._makeIntAttribute(attributes["repos_count"])
575 if "repositories_url" in attributes: # pragma no branch
576 self._repositories_url = self._makeStringAttribute(attributes["repositories_url"])
577 if "slug" in attributes: # pragma no branch
578 self._slug = self._makeStringAttribute(attributes["slug"])
579 if "sync_to_organizations" in attributes: # pragma no branch
580 self._sync_to_organizations = self._makeStringAttribute(attributes["sync_to_organizations"])
581 if "type" in attributes: # pragma no branch
582 self._type = self._makeStringAttribute(attributes["type"])
583 if "updated_at" in attributes: # pragma no branch
584 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
585 if "url" in attributes: # pragma no branch

Callers 1

editMethod · 0.95

Calls 4

_makeStringAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80
_makeClassAttributeMethod · 0.80

Tested by

no test coverage detected