mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user