Skip to content
This repository was archived by the owner on Dec 17, 2019. It is now read-only.

Commit 1abcce9

Browse files
committed
Fix naming
1 parent 30033cb commit 1abcce9

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

docs/repos.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _Repos service:
22

3-
Repos's services
3+
Repos services
44
===================
55

66
**Fast sample**::
@@ -50,7 +50,7 @@ You can see it better with an example: ::
5050
Repo
5151
-------
5252

53-
.. autoclass:: pygithub3.services.repos.Repos
53+
.. autoclass:: pygithub3.services.repos.Repo
5454
:members:
5555

5656
.. attribute:: collaborators

docs/users.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.. _User service:
1+
.. _Users service:
22

3-
User's services
3+
Users services
44
===============
55

66
**Fast sample**::

pygithub3/github.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- encoding: utf-8 -*-
33

44

5+
#TODO: Move the imports out. setup related
56
class Github(object):
67
"""
78
You can preconfigure all services globally with a ``config`` dict. See
@@ -14,10 +15,10 @@ class Github(object):
1415

1516
def __init__(self, **config):
1617
from pygithub3.services.users import User
17-
from pygithub3.services.repos import Repos
18+
from pygithub3.services.repos import Repo
1819
from pygithub3.services.gists import Gist
1920
self._users = User(**config)
20-
self._repos = Repos(**config)
21+
self._repos = Repo(**config)
2122
self._gists = Gist(**config)
2223

2324
@property
@@ -29,7 +30,7 @@ def remaining_requests(self):
2930
@property
3031
def users(self):
3132
"""
32-
:ref:`User service <User service>`
33+
:ref:`Users service <Users service>`
3334
"""
3435
return self._users
3536

@@ -43,6 +44,6 @@ def repos(self):
4344
@property
4445
def gists(self):
4546
"""
46-
:ref:`Gist service <Gist service>`
47+
:ref:`Gists service <Gists service>`
4748
"""
4849
return self._gists

pygithub3/services/repos/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .hooks import Hooks
1212

1313

14-
class Repos(Service):
14+
class Repo(Service):
1515
""" Consume `Repos API <http://developer.github.com/v3/repos>`_ """
1616

1717
def __init__(self, **config):
@@ -22,7 +22,7 @@ def __init__(self, **config):
2222
self.keys = Keys(**config)
2323
self.watchers = Watchers(**config)
2424
self.hooks = Hooks(**config)
25-
super(Repos, self).__init__(**config)
25+
super(Repo, self).__init__(**config)
2626

2727
def list(self, user=None, type='all'):
2828
""" Get user's repositories
@@ -133,7 +133,7 @@ def list_contributors(self, user=None, repo=None):
133133
return self.__list_contributors(user, repo)
134134

135135
def list_contributors_with_anonymous(self, user=None, repo=None):
136-
""" Like :attr:`~pygithub3.services.repos.Repos.list_contributors` plus
136+
""" Like :attr:`~pygithub3.services.repos.Repo.list_contributors` plus
137137
anonymous """
138138
return self.__list_contributors(user, repo, anom=True)
139139

pygithub3/tests/services/test_repos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from mock import patch, Mock
66

77
from pygithub3.tests.utils.core import TestCase
8-
from pygithub3.services.repos import (Repos, Collaborators, Commits, Downloads,
8+
from pygithub3.services.repos import (Repo, Collaborators, Commits, Downloads,
99
Forks, Keys, Watchers, Hooks)
1010
from pygithub3.resources.base import json
1111
from pygithub3.tests.utils.base import (mock_response, mock_response_result,
@@ -20,7 +20,7 @@
2020
class TestRepoService(TestCase):
2121

2222
def setUp(self):
23-
self.rs = Repos()
23+
self.rs = Repo()
2424
self.rs.set_user('octocat')
2525
self.rs.set_repo('octocat_repo')
2626

0 commit comments

Comments
 (0)