Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58eef77

Browse files
committed
Clean up gists imports and GistHistory docstrings
1 parentb21bd44 commit58eef77

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

‎github3/gists/file.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"""Module containing the GistFile object."""
33
from __future__importunicode_literals
44

5-
from ..modelsimportGitHubCore
5+
from ..importmodels
66

77

8-
class_GistFile(GitHubCore):
8+
class_GistFile(models.GitHubCore):
99
"""Base for GistFile classes."""
1010

1111
def_update_attributes(self,gistfile):

‎github3/gists/gist.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
fromjsonimportdumps
66

7+
from ..importmodels
78
from ..importusers
89

9-
from ..modelsimportGitHubCore
1010
from ..decoratorsimportrequires_auth
1111
from .importcomment
1212
from .importfileasgistfile
1313
from .importhistory
1414

1515

16-
class_Gist(GitHubCore):
16+
class_Gist(models.GitHubCore):
1717
"""This object holds all the information returned by Github about a gist.
1818
1919
With it you can comment on or fork the gist (assuming you are
@@ -309,7 +309,7 @@ class ShortGist(_Gist):
309309
class_name='ShortGist'
310310

311311

312-
classGistFork(GitHubCore):
312+
classGistFork(models.GitHubCore):
313313
"""This object represents a forked Gist.
314314
315315
This has a subset of attributes of a

‎github3/gists/history.py‎

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"""Module containing the GistHistory object."""
33
from __future__importunicode_literals
44

5+
from ..importmodels
56
from ..importusers
6-
from ..modelsimportGitHubCore
77

88

9-
classGistHistory(GitHubCore):
9+
classGistHistory(models.GitHubCore):
1010
"""This object represents one version (or revision) of a gist.
1111
1212
The GitHub API returns the following attributes:
@@ -53,27 +53,12 @@ class GistHistory(GitHubCore):
5353

5454
def_update_attributes(self,history):
5555
self.url=self._api=history['url']
56-
57-
#: SHA of the commit associated with this version
5856
self.version=history['version']
59-
60-
#: user who made these changes
6157
self.user=users.ShortUser(history['user'],self)
62-
63-
#: dict containing the change status; see also: deletions, additions,
64-
#: total
6558
self.change_status=history['change_status']
66-
67-
#: number of additions made
6859
self.additions=self.change_status['additions']
69-
70-
#: number of deletions made
7160
self.deletions=self.change_status['deletions']
72-
73-
#: total number of changes made
7461
self.total=self.change_status['total']
75-
76-
#: datetime representation of when the commit was made
7762
self.committed_at=self._strptime(history['committed_at'])
7863

7964
def_repr(self):
@@ -82,8 +67,10 @@ def _repr(self):
8267
defgist(self):
8368
"""Retrieve the gist at this version.
8469
85-
:returns: the gist at this point in history or ``None``
86-
:rtype: :class:`Gist <github3.gists.gist.Gist>`
70+
:returns:
71+
the gist at this point in history or ``None``
72+
:rtype:
73+
:class:`Gist <github3.gists.gist.Gist>`
8774
"""
8875
from .gistimportGist
8976
json=self._json(self._get(self._api),200)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp