8000 Remove class GitHubSearch · domdfcoding/github3.py@b4d7ef8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b4d7ef8

Browse files
committed
Remove class GitHubSearch
Requests sent from search result classes do not actually count against the 'search' rate limit. Only search requests (i.e. by a `SearchIterator` incur 'search' rate limit.
1 parent e6246ef commit b4d7ef8

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

github3/models.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,3 @@ def _update_attributes(self, acct):
503503

504504
def _repr(self):
505505
return '<{s.type} [{s.login}:{s.name}]>'.format(s=self)
506-
507-
508-
class GitHubSearch(GitHubCore):
509-
"""The base object for all search objects."""
510-
_ratelimit_resource = 'search'

github3/search/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .. import repos
66

77

8-
class CodeSearchResult(models.GitHubSearch):
8+
class CodeSearchResult(models.GitHubCore):
99

1010
def _update_attributes(self, data):
1111
self._api = self._get_attribute(data, 'url')

github3/search/issue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
from ..models import GitHubSearch
4+
from ..models import GitHubCore
55
from ..issues import ShortIssue
66

77

8-
class IssueSearchResult(GitHubSearch):
8+
class IssueSearchResult(GitHubCore):
99
def _update_attributes(self, data):
1010
result = data.copy()
1111

github3/search/repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .. import repos
66

77

8-
class RepositorySearchResult(models.GitHubSearch):
8+
class RepositorySearchResult(models.GitHubCore):
99
def _update_attributes(self, data):
1010
result = data.copy()
1111

github3/search/user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
from __future__ import unicode_literals
33

44
from .. import users
5-
from ..models import GitHubSearch
5+
from ..models import GitHubCore
66

77

8-
class UserSearchResult(GitHubSearch):
8+
class UserSearchResult(GitHubCore):
99
def _update_attributes(self, data):
1010
result = data.copy()
1111

0 commit comments

Comments
 (0)
0