Remove Repository.topics (#1505)

The topics attribute has been replaced by Repository.get_topics(). To
reduce user confusion, delete the attribute.

Fixes #1504
This commit is contained in:
Steve Kowalik
2020-05-15 10:49:15 +10:00
committed by GitHub
parent 7b20b13d0b
commit 53d58d2b07
3 changed files with 0 additions and 14 deletions
-11
View File
@@ -758,14 +758,6 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._completeIfNotSet(self._teams_url)
return self._teams_url.value
@property
def topics(self):
"""
:type: list of strings
"""
self._completeIfNotSet(self._topics)
return self._topics.value
@property
def trees_url(self):
"""
@@ -3413,7 +3405,6 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._svn_url = github.GithubObject.NotSet
self._tags_url = github.GithubObject.NotSet
self._teams_url = github.GithubObject.NotSet
self._topics = github.GithubObject.NotSet
self._trees_url = github.GithubObject.NotSet
self._updated_at = github.GithubObject.NotSet
self._url = github.GithubObject.NotSet
@@ -3619,8 +3610,6 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._teams_url = self._makeStringAttribute(attributes["teams_url"])
if "trees_url" in attributes: # pragma no branch
self._trees_url = self._makeStringAttribute(attributes["trees_url"])
if "topics" in attributes: # pragma no branch
self._topics = self._makeListOfStringsAttribute(attributes["topics"])
if "updated_at" in attributes: # pragma no branch
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
if "url" in attributes: # pragma no branch
-2
View File
@@ -495,8 +495,6 @@ class Repository(CompletableGithubObject):
@property
def teams_url(self) -> str: ...
@property
def topics(self) -> List[str]: ...
@property
def trees_url(self) -> str: ...
def unsubscribe_from_hub(self, event: str, callback: str) -> None: ...
def update_file(
-1
View File
@@ -105,7 +105,6 @@ class Repository(Framework.TestCase):
self.assertEqual(self.repo.source, None)
self.assertEqual(self.repo.ssh_url, "git@github.com:jacquev6/PyGithub.git")
self.assertEqual(self.repo.svn_url, "https://github.com/jacquev6/PyGithub")
self.assertEqual(self.repo.topics, None)
self.assertEqual(
self.repo.updated_at, datetime.datetime(2012, 5, 27, 6, 55, 28)
)