+ python scripts/openapi.py --dry-run create class --completable --tests github openapi.spec.json openapi.index NamedUser https://docs.github.com/en/rest/reference/users#get-a-user /components/schemas/public-user
Creating class github.NamedUser.NamedUser with parent github.GithubObject.CompletableGithubObject in ./github/NamedUser.py
Updating temporary index
Indexing 2 Python files
Indexed 10 classes
Indexed 0 paths
Indexed 1 schemas
Indexing OpenAPI spec
Using spec openapi.spec.json
Applying API schemas to PyGithub class NamedUser
Applying spec openapi.spec.json to github.NamedUser.NamedUser (github/NamedUser.py)
Applying schema /components/schemas/public-user
Class NamedUser changed
Test tests/NamedUser.py changed

./github/NamedUser.py:
+############################ Copyrights and license ############################
+#                                                                              #
+#                                                                              #
+# This file is part of PyGithub.                                               #
+# http://pygithub.readthedocs.io/                                              #
+#                                                                              #
+# PyGithub is free software: you can redistribute it and/or modify it under    #
+# the terms of the GNU Lesser General Public License as published by the Free  #
+# Software Foundation, either version 3 of the License, or (at your option)    #
+# any later version.                                                           #
+#                                                                              #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY  #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS    #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details.                                                                     #
+#                                                                              #
+# You should have received a copy of the GNU Lesser General Public License     #
+# along with PyGithub. If not, see <http://www.gnu.org/licenses/>.             #
+#                                                                              #
+################################################################################
+
+from __future__ import annotations
+
+from typing import Any, TYPE_CHECKING
+from datetime import datetime, timezone
+
+from github.GithubObject import CompletableGithubObject
+from github.GithubObject import Attribute, NotSet
+
+if TYPE_CHECKING:
+    pass
+
+
+class NamedUser(CompletableGithubObject):
+    """
+    This class represents NamedUser.
+
+    The reference can be found here
+    https://docs.github.com/en/rest/reference/users#get-a-user
+
+    The OpenAPI schema can be found at
+
+    - /components/schemas/public-user
+
+    """
+
+    def _initAttributes(self) -> None:
+        super()._initAttributes()
+        self._avatar_url: Attribute[str] = NotSet
+        self._bio: Attribute[str] = NotSet
+        self._blog: Attribute[str] = NotSet
+        self._collaborators: Attribute[int] = NotSet
+        self._company: Attribute[str] = NotSet
+        self._created_at: Attribute[datetime] = NotSet
+        self._disk_usage: Attribute[int] = NotSet
+        self._email: Attribute[str] = NotSet
+        self._events_url: Attribute[str] = NotSet
+        self._followers: Attribute[int] = NotSet
+        self._followers_url: Attribute[str] = NotSet
+        self._following: Attribute[int] = NotSet
+        self._following_url: Attribute[str] = NotSet
+        self._gists_url: Attribute[str] = NotSet
+        self._gravatar_id: Attribute[str] = NotSet
+        self._hireable: Attribute[bool] = NotSet
+        self._html_url: Attribute[str] = NotSet
+        self._id: Attribute[int] = NotSet
+        self._location: Attribute[str] = NotSet
+        self._login: Attribute[str] = NotSet
+        self._name: Attribute[str] = NotSet
+        self._node_id: Attribute[str] = NotSet
+        self._notification_email: Attribute[str] = NotSet
+        self._organizations_url: Attribute[str] = NotSet
+        self._owned_private_repos: Attribute[int] = NotSet
+        self._private_gists: Attribute[int] = NotSet
+        self._public_gists: Attribute[int] = NotSet
+        self._public_repos: Attribute[int] = NotSet
+        self._received_events_url: Attribute[str] = NotSet
+        self._repos_url: Attribute[str] = NotSet
+        self._site_admin: Attribute[bool] = NotSet
+        self._starred_url: Attribute[str] = NotSet
+        self._subscriptions_url: Attribute[str] = NotSet
+        self._total_private_repos: Attribute[int] = NotSet
+        self._twitter_username: Attribute[str] = NotSet
+        self._type: Attribute[str] = NotSet
+        self._updated_at: Attribute[datetime] = NotSet
+        self._user_view_type: Attribute[str] = NotSet
+
+    def __repr__(self) -> str:
+        # TODO: replace "some_attribute" with uniquely identifying attributes in the dict, then run:
+        return self.get__repr__({"some_attribute": self._some_attribute.value})
+
+    @property
+    def avatar_url(self) -> str:
+        self._completeIfNotSet(self._avatar_url)
+        return self._avatar_url.value
+
+    @property
+    def bio(self) -> str:
+        self._completeIfNotSet(self._bio)
+        return self._bio.value
+
+    @property
+    def blog(self) -> str:
+        self._completeIfNotSet(self._blog)
+        return self._blog.value
+
+    @property
+    def collaborators(self) -> int:
+        self._completeIfNotSet(self._collaborators)
+        return self._collaborators.value
+
+    @property
+    def company(self) -> str:
+        self._completeIfNotSet(self._company)
+        return self._company.value
+
+    @property
+    def created_at(self) -> datetime:
+        self._completeIfNotSet(self._created_at)
+        return self._created_at.value
+
+    @property
+    def disk_usage(self) -> int:
+        self._completeIfNotSet(self._disk_usage)
+        return self._disk_usage.value
+
+    @property
+    def email(self) -> str:
+        self._completeIfNotSet(self._email)
+        return self._email.value
+
+    @property
+    def events_url(self) -> str:
+        self._completeIfNotSet(self._events_url)
+        return self._events_url.value
+
+    @property
+    def followers(self) -> int:
+        self._completeIfNotSet(self._followers)
+        return self._followers.value
+
+    @property
+    def followers_url(self) -> str:
+        self._completeIfNotSet(self._followers_url)
+        return self._followers_url.value
+
+    @property
+    def following(self) -> int:
+        self._completeIfNotSet(self._following)
+        return self._following.value
+
+    @property
+    def following_url(self) -> str:
+        self._completeIfNotSet(self._following_url)
+        return self._following_url.value
+
+    @property
+    def gists_url(self) -> str:
+        self._completeIfNotSet(self._gists_url)
+        return self._gists_url.value
+
+    @property
+    def gravatar_id(self) -> str:
+        self._completeIfNotSet(self._gravatar_id)
+        return self._gravatar_id.value
+
+    @property
+    def hireable(self) -> bool:
+        self._completeIfNotSet(self._hireable)
+        return self._hireable.value
+
+    @property
+    def html_url(self) -> str:
+        self._completeIfNotSet(self._html_url)
+        return self._html_url.value
+
+    @property
+    def id(self) -> int:
+        self._completeIfNotSet(self._id)
+        return self._id.value
+
+    @property
+    def location(self) -> str:
+        self._completeIfNotSet(self._location)
+        return self._location.value
+
+    @property
+    def login(self) -> str:
+        self._completeIfNotSet(self._login)
+        return self._login.value
+
+    @property
+    def name(self) -> str:
+        self._completeIfNotSet(self._name)
+        return self._name.value
+
+    @property
+    def node_id(self) -> str:
+        self._completeIfNotSet(self._node_id)
+        return self._node_id.value
+
+    @property
+    def notification_email(self) -> str:
+        self._completeIfNotSet(self._notification_email)
+        return self._notification_email.value
+
+    @property
+    def organizations_url(self) -> str:
+        self._completeIfNotSet(self._organizations_url)
+        return self._organizations_url.value
+
+    @property
+    def owned_private_repos(self) -> int:
+        self._completeIfNotSet(self._owned_private_repos)
+        return self._owned_private_repos.value
+
+    @property
+    def private_gists(self) -> int:
+        self._completeIfNotSet(self._private_gists)
+        return self._private_gists.value
+
+    @property
+    def public_gists(self) -> int:
+        self._completeIfNotSet(self._public_gists)
+        return self._public_gists.value
+
+    @property
+    def public_repos(self) -> int:
+        self._completeIfNotSet(self._public_repos)
+        return self._public_repos.value
+
+    @property
+    def received_events_url(self) -> str:
+        self._completeIfNotSet(self._received_events_url)
+        return self._received_events_url.value
+
+    @property
+    def repos_url(self) -> str:
+        self._completeIfNotSet(self._repos_url)
+        return self._repos_url.value
+
+    @property
+    def site_admin(self) -> bool:
+        self._completeIfNotSet(self._site_admin)
+        return self._site_admin.value
+
+    @property
+    def starred_url(self) -> str:
+        self._completeIfNotSet(self._starred_url)
+        return self._starred_url.value
+
+    @property
+    def subscriptions_url(self) -> str:
+        self._completeIfNotSet(self._subscriptions_url)
+        return self._subscriptions_url.value
+
+    @property
+    def total_private_repos(self) -> int:
+        self._completeIfNotSet(self._total_private_repos)
+        return self._total_private_repos.value
+
+    @property
+    def twitter_username(self) -> str:
+        self._completeIfNotSet(self._twitter_username)
+        return self._twitter_username.value
+
+    @property
+    def type(self) -> str:
+        self._completeIfNotSet(self._type)
+        return self._type.value
+
+    @property
+    def updated_at(self) -> datetime:
+        self._completeIfNotSet(self._updated_at)
+        return self._updated_at.value
+
+    @property
+    def user_view_type(self) -> str:
+        self._completeIfNotSet(self._user_view_type)
+        return self._user_view_type.value
+
+    def _useAttributes(self, attributes: dict[str, Any]) -> None:
+        super()._useAttributes(attributes)
+        if "avatar_url" in attributes:  # pragma no branch
+            self._avatar_url = self._makeStringAttribute(attributes["avatar_url"])
+        if "bio" in attributes:  # pragma no branch
+            self._bio = self._makeStringAttribute(attributes["bio"])
+        if "blog" in attributes:  # pragma no branch
+            self._blog = self._makeStringAttribute(attributes["blog"])
+        if "collaborators" in attributes:  # pragma no branch
+            self._collaborators = self._makeIntAttribute(attributes["collaborators"])
+        if "company" in attributes:  # pragma no branch
+            self._company = self._makeStringAttribute(attributes["company"])
+        if "created_at" in attributes:  # pragma no branch
+            self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
+        if "disk_usage" in attributes:  # pragma no branch
+            self._disk_usage = self._makeIntAttribute(attributes["disk_usage"])
+        if "email" in attributes:  # pragma no branch
+            self._email = self._makeStringAttribute(attributes["email"])
+        if "events_url" in attributes:  # pragma no branch
+            self._events_url = self._makeStringAttribute(attributes["events_url"])
+        if "followers" in attributes:  # pragma no branch
+            self._followers = self._makeIntAttribute(attributes["followers"])
+        if "followers_url" in attributes:  # pragma no branch
+            self._followers_url = self._makeStringAttribute(attributes["followers_url"])
+        if "following" in attributes:  # pragma no branch
+            self._following = self._makeIntAttribute(attributes["following"])
+        if "following_url" in attributes:  # pragma no branch
+            self._following_url = self._makeStringAttribute(attributes["following_url"])
+        if "gists_url" in attributes:  # pragma no branch
+            self._gists_url = self._makeStringAttribute(attributes["gists_url"])
+        if "gravatar_id" in attributes:  # pragma no branch
+            self._gravatar_id = self._makeStringAttribute(attributes["gravatar_id"])
+        if "hireable" in attributes:  # pragma no branch
+            self._hireable = self._makeBoolAttribute(attributes["hireable"])
+        if "html_url" in attributes:  # pragma no branch
+            self._html_url = self._makeStringAttribute(attributes["html_url"])
+        if "id" in attributes:  # pragma no branch
+            self._id = self._makeIntAttribute(attributes["id"])
+        if "location" in attributes:  # pragma no branch
+            self._location = self._makeStringAttribute(attributes["location"])
+        if "login" in attributes:  # pragma no branch
+            self._login = self._makeStringAttribute(attributes["login"])
+        if "name" in attributes:  # pragma no branch
+            self._name = self._makeStringAttribute(attributes["name"])
+        if "node_id" in attributes:  # pragma no branch
+            self._node_id = self._makeStringAttribute(attributes["node_id"])
+        if "notification_email" in attributes:  # pragma no branch
+            self._notification_email = self._makeStringAttribute(attributes["notification_email"])
+        if "organizations_url" in attributes:  # pragma no branch
+            self._organizations_url = self._makeStringAttribute(attributes["organizations_url"])
+        if "owned_private_repos" in attributes:  # pragma no branch
+            self._owned_private_repos = self._makeIntAttribute(attributes["owned_private_repos"])
+        if "private_gists" in attributes:  # pragma no branch
+            self._private_gists = self._makeIntAttribute(attributes["private_gists"])
+        if "public_gists" in attributes:  # pragma no branch
+            self._public_gists = self._makeIntAttribute(attributes["public_gists"])
+        if "public_repos" in attributes:  # pragma no branch
+            self._public_repos = self._makeIntAttribute(attributes["public_repos"])
+        if "received_events_url" in attributes:  # pragma no branch
+            self._received_events_url = self._makeStringAttribute(attributes["received_events_url"])
+        if "repos_url" in attributes:  # pragma no branch
+            self._repos_url = self._makeStringAttribute(attributes["repos_url"])
+        if "site_admin" in attributes:  # pragma no branch
+            self._site_admin = self._makeBoolAttribute(attributes["site_admin"])
+        if "starred_url" in attributes:  # pragma no branch
+            self._starred_url = self._makeStringAttribute(attributes["starred_url"])
+        if "subscriptions_url" in attributes:  # pragma no branch
+            self._subscriptions_url = self._makeStringAttribute(attributes["subscriptions_url"])
+        if "total_private_repos" in attributes:  # pragma no branch
+            self._total_private_repos = self._makeIntAttribute(attributes["total_private_repos"])
+        if "twitter_username" in attributes:  # pragma no branch
+            self._twitter_username = self._makeStringAttribute(attributes["twitter_username"])
+        if "type" in attributes:  # pragma no branch
+            self._type = self._makeStringAttribute(attributes["type"])
+        if "updated_at" in attributes:  # pragma no branch
+            self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
+        if "user_view_type" in attributes:  # pragma no branch
+            self._user_view_type = self._makeStringAttribute(attributes["user_view_type"])
+

./tests/NamedUser.py:
+############################ Copyrights and license ############################
+#                                                                              #
+#                                                                              #
+# This file is part of PyGithub.                                               #
+# http://pygithub.readthedocs.io/                                              #
+#                                                                              #
+# PyGithub is free software: you can redistribute it and/or modify it under    #
+# the terms of the GNU Lesser General Public License as published by the Free  #
+# Software Foundation, either version 3 of the License, or (at your option)    #
+# any later version.                                                           #
+#                                                                              #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY  #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS    #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details.                                                                     #
+#                                                                              #
+# You should have received a copy of the GNU Lesser General Public License     #
+# along with PyGithub. If not, see <http://www.gnu.org/licenses/>.             #
+#                                                                              #
+################################################################################
+
+from __future__ import annotations
+
+from datetime import datetime, timezone
+
+from . import Framework
+
+
+class NamedUser(Framework.TestCase):
+    def setUp(self):
+        super().setUp()
+        # TODO: create an instance of type NamedUser and assign to self.nu, then run:
+        #   pytest ./tests/NamedUser.py -k testAttributes --record
+        #   ./scripts/update-assertions.sh ./tests/NamedUser.py testAttributes
+        #   pre-commit run --all-files
+        self.nu = None
+
+    def testAttributes(self):
+        nu = self.nu
+        self.assertEqual(nu.__repr__(), "")
+        self.assertEqual(nu.avatar_url, "")
+        self.assertEqual(nu.bio, "")
+        self.assertEqual(nu.blog, "")
+        self.assertEqual(nu.collaborators, 0)
+        self.assertEqual(nu.company, "")
+        self.assertEqual(nu.created_at, datetime(2020, 1, 2, 12, 34, 56, tzinfo=timezone.utc))
+        self.assertEqual(nu.disk_usage, 0)
+        self.assertEqual(nu.email, "")
+        self.assertEqual(nu.events_url, "")
+        self.assertEqual(nu.followers, 0)
+        self.assertEqual(nu.followers_url, "")
+        self.assertEqual(nu.following, 0)
+        self.assertEqual(nu.following_url, "")
+        self.assertEqual(nu.gists_url, "")
+        self.assertEqual(nu.gravatar_id, "")
+        self.assertEqual(nu.hireable, False)
+        self.assertEqual(nu.html_url, "")
+        self.assertEqual(nu.id, 0)
+        self.assertEqual(nu.location, "")
+        self.assertEqual(nu.login, "")
+        self.assertEqual(nu.name, "")
+        self.assertEqual(nu.node_id, "")
+        self.assertEqual(nu.notification_email, "")
+        self.assertEqual(nu.organizations_url, "")
+        self.assertEqual(nu.owned_private_repos, 0)
+        self.assertEqual(nu.private_gists, 0)
+        self.assertEqual(nu.public_gists, 0)
+        self.assertEqual(nu.public_repos, 0)
+        self.assertEqual(nu.received_events_url, "")
+        self.assertEqual(nu.repos_url, "")
+        self.assertEqual(nu.site_admin, False)
+        self.assertEqual(nu.starred_url, "")
+        self.assertEqual(nu.subscriptions_url, "")
+        self.assertEqual(nu.total_private_repos, 0)
+        self.assertEqual(nu.twitter_username, "")
+        self.assertEqual(nu.type, "")
+        self.assertEqual(nu.updated_at, datetime(2020, 1, 2, 12, 34, 56, tzinfo=timezone.utc))
+        self.assertEqual(nu.url, "")
+        self.assertEqual(nu.user_view_type, "")
+ python scripts/openapi.py create class --completable --tests github openapi.spec.json openapi.index NamedUser https://docs.github.com/en/rest/reference/users#get-a-user /components/schemas/public-user
Creating class github.NamedUser.NamedUser with parent github.GithubObject.CompletableGithubObject in ./github/NamedUser.py
Updating index
Indexing 2 Python files
Indexed 10 classes
Indexed 0 paths
Indexed 1 schemas
Indexing OpenAPI spec
Using spec openapi.spec.json
Applying API schemas to PyGithub class NamedUser
Applying spec openapi.spec.json to github.NamedUser.NamedUser (github/NamedUser.py)
Applying schema /components/schemas/public-user
Class NamedUser changed
Test tests/NamedUser.py changed
+ python scripts/openapi.py index github openapi.spec.json openapi.index
Indexing 2 Python files
Indexed 10 classes
Indexed 0 paths
Indexed 1 schemas
Indexing OpenAPI spec
