(self, attributes: dict[str, Any])
| 598 | return github.Membership.Membership(self._requester, headers, data, completed=True) |
| 599 | |
| 600 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 601 | if "avatar_url" in attributes: # pragma no branch |
| 602 | self._avatar_url = self._makeStringAttribute(attributes["avatar_url"]) |
| 603 | if "bio" in attributes: # pragma no branch |
| 604 | self._bio = self._makeStringAttribute(attributes["bio"]) |
| 605 | if "blog" in attributes: # pragma no branch |
| 606 | self._blog = self._makeStringAttribute(attributes["blog"]) |
| 607 | if "business_plus" in attributes: # pragma no branch |
| 608 | self._business_plus = self._makeBoolAttribute(attributes["business_plus"]) |
| 609 | if "collaborators" in attributes: # pragma no branch |
| 610 | self._collaborators = self._makeIntAttribute(attributes["collaborators"]) |
| 611 | if "company" in attributes: # pragma no branch |
| 612 | self._company = self._makeStringAttribute(attributes["company"]) |
| 613 | if "contributions" in attributes: # pragma no branch |
| 614 | self._contributions = self._makeIntAttribute(attributes["contributions"]) |
| 615 | if "created_at" in attributes: # pragma no branch |
| 616 | self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) |
| 617 | if "disk_usage" in attributes: # pragma no branch |
| 618 | self._disk_usage = self._makeIntAttribute(attributes["disk_usage"]) |
| 619 | if "display_login" in attributes: # pragma no branch |
| 620 | self._display_login = self._makeStringAttribute(attributes["display_login"]) |
| 621 | if "email" in attributes: # pragma no branch |
| 622 | self._email = self._makeStringAttribute(attributes["email"]) |
| 623 | if "events_url" in attributes: # pragma no branch |
| 624 | self._events_url = self._makeStringAttribute(attributes["events_url"]) |
| 625 | if "followers" in attributes: # pragma no branch |
| 626 | self._followers = self._makeIntAttribute(attributes["followers"]) |
| 627 | if "followers_url" in attributes: # pragma no branch |
| 628 | self._followers_url = self._makeStringAttribute(attributes["followers_url"]) |
| 629 | if "following" in attributes: # pragma no branch |
| 630 | self._following = self._makeIntAttribute(attributes["following"]) |
| 631 | if "following_url" in attributes: # pragma no branch |
| 632 | self._following_url = self._makeStringAttribute(attributes["following_url"]) |
| 633 | if "gists_url" in attributes: # pragma no branch |
| 634 | self._gists_url = self._makeStringAttribute(attributes["gists_url"]) |
| 635 | if "gravatar_id" in attributes: # pragma no branch |
| 636 | self._gravatar_id = self._makeStringAttribute(attributes["gravatar_id"]) |
| 637 | if "hireable" in attributes: # pragma no branch |
| 638 | self._hireable = self._makeBoolAttribute(attributes["hireable"]) |
| 639 | if "html_url" in attributes: # pragma no branch |
| 640 | self._html_url = self._makeStringAttribute(attributes["html_url"]) |
| 641 | if "id" in attributes: # pragma no branch |
| 642 | self._id = self._makeIntAttribute(attributes["id"]) |
| 643 | elif "url" in attributes and attributes["url"]: |
| 644 | id = attributes["url"].split("/")[-1] |
| 645 | # url could also reference user id (int): /users/login |
| 646 | # or some derived class like /orgs/{org}/invitations/{invitation_id} |
| 647 | if id.isnumeric() and attributes["url"].endswith(f"/user/{id}"): |
| 648 | self._id = self._makeIntAttribute(int(id)) |
| 649 | if "invitation_teams_url" in attributes: # pragma no branch |
| 650 | self._invitation_teams_url = self._makeStringAttribute(attributes["invitation_teams_url"]) |
| 651 | if "inviter" in attributes: # pragma no branch |
| 652 | self._inviter = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["inviter"]) |
| 653 | if "ldap_dn" in attributes: # pragma no branch |
| 654 | self._ldap_dn = self._makeStringAttribute(attributes["ldap_dn"]) |
| 655 | if "location" in attributes: # pragma no branch |
| 656 | self._location = self._makeStringAttribute(attributes["location"]) |
| 657 | if "login" in attributes: # pragma no branch |
no test coverage detected