Skip to content

Commit 4ef16f8

Browse files
Update objects to inherit from GitHubCore
$ grep -r --exclude "*.pyc" "GitHubObject" github3/* github3/models.py:class GitHubObject(object): github3/models.py: """The :class:`GitHubObject <GitHubObject>` object. A basic class to be github3/models.py: super(GitHubObject, self).__init__() github3/models.py:class GitHubCore(GitHubObject):
1 parent 4f9b637 commit 4ef16f8

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

github3/git.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
from json import dumps
1313
from base64 import b64decode
14-
from .models import GitHubObject, GitHubCore, BaseCommit
14+
from .models import GitHubCore, BaseCommit
1515
from .users import User
1616
from .decorators import requires_auth
1717

1818

19-
class Blob(GitHubObject):
19+
class Blob(GitHubCore):
2020

2121
"""The :class:`Blob <Blob>` object.
2222
@@ -216,7 +216,7 @@ def recurse(self):
216216
return self._instance_or_null(Tree, json)
217217

218218

219-
class Hash(GitHubObject):
219+
class Hash(GitHubCore):
220220

221221
"""The :class:`Hash <Hash>` object.
222222

github3/repos/pages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
3-
from ..models import GitHubObject
3+
from ..models import GitHubCore
44

55

6-
class PagesInfo(GitHubObject):
6+
class PagesInfo(GitHubCore):
77
def _update_attributes(self, info):
88
self._api = info.get('url')
99

@@ -24,7 +24,7 @@ def _repr(self):
2424
return '<Pages Info [{0}]>'.format(info)
2525

2626

27-
class PagesBuild(GitHubObject):
27+
class PagesBuild(GitHubCore):
2828
def _update_attributes(self, build):
2929
self._api = build.get('url')
3030

github3/repos/status.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"""
99
from __future__ import unicode_literals
1010

11-
from ..models import GitHubObject
11+
from ..models import GitHubCore
1212
from ..users import User
1313

1414

15-
class Status(GitHubObject):
15+
class Status(GitHubCore):
1616
"""The :class:`Status <Status>` object. This represents information from
1717
the Repo Status API.
1818

github3/repos/tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"""
99
from __future__ import unicode_literals
1010

11-
from ..models import GitHubObject
11+
from ..models import GitHubCore
1212

1313

14-
class RepoTag(GitHubObject):
14+
class RepoTag(GitHubCore):
1515
"""The :class:`RepoTag <RepoTag>` object. This stores the information
1616
representing a tag that was created on a repository.
1717

github3/structs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __iter__(self):
8080

8181
# languages returns a single dict. We want the items.
8282
if isinstance(json, dict):
83-
if issubclass(self.cls, models.GitHubObject):
83+
if issubclass(self.cls, models.GitHubCore):
8484
raise exceptions.UnprocessableResponseBody(
8585
"GitHub's API returned a body that could not be"
8686
" handled", json

github3/users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from github3.auths import Authorization
1313
from uritemplate import URITemplate
1414
from .events import Event
15-
from .models import GitHubObject, GitHubCore, BaseAccount
15+
from .models import GitHubCore, BaseAccount
1616
from .decorators import requires_auth
1717

1818

@@ -74,7 +74,7 @@ def update(self, title, key):
7474
return False
7575

7676

77-
class Plan(GitHubObject):
77+
class Plan(GitHubCore):
7878
"""The :class:`Plan <Plan>` object. This makes interacting with the plan
7979
information about a user easier. Please see GitHub's `Authenticated User
8080
<http://developer.github.com/v3/users/#get-the-authenticated-user>`_

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy