aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-04-03 23:16:49 +0200
committerDavid Medina <davidmedina9@gmail.com>2012-04-03 23:17:15 +0200
commit1abcce9551c83f3ad00303a8d4ef555c9c62f8a4 (patch)
tree67a2b7a5a68d13ca61965de897900ecc4dd0fa9f /pygithub3
parentservices.gists.Comment done (diff)
downloadpython-github3-1abcce9551c83f3ad00303a8d4ef555c9c62f8a4.tar.xz
python-github3-1abcce9551c83f3ad00303a8d4ef555c9c62f8a4.zip
Fix naming
Diffstat (limited to '')
-rw-r--r--pygithub3/github.py9
-rw-r--r--pygithub3/services/repos/__init__.py6
-rw-r--r--pygithub3/tests/services/test_repos.py4
3 files changed, 10 insertions, 9 deletions
diff --git a/pygithub3/github.py b/pygithub3/github.py
index 1cf9b05..0b302a1 100644
--- a/pygithub3/github.py
+++ b/pygithub3/github.py
@@ -2,6 +2,7 @@
# -*- encoding: utf-8 -*-
+#TODO: Move the imports out. setup related
class Github(object):
"""
You can preconfigure all services globally with a ``config`` dict. See
@@ -14,10 +15,10 @@ class Github(object):
def __init__(self, **config):
from pygithub3.services.users import User
- from pygithub3.services.repos import Repos
+ from pygithub3.services.repos import Repo
from pygithub3.services.gists import Gist
self._users = User(**config)
- self._repos = Repos(**config)
+ self._repos = Repo(**config)
self._gists = Gist(**config)
@property
@@ -29,7 +30,7 @@ class Github(object):
@property
def users(self):
"""
- :ref:`User service <User service>`
+ :ref:`Users service <Users service>`
"""
return self._users
@@ -43,6 +44,6 @@ class Github(object):
@property
def gists(self):
"""
- :ref:`Gist service <Gist service>`
+ :ref:`Gists service <Gists service>`
"""
return self._gists
diff --git a/pygithub3/services/repos/__init__.py b/pygithub3/services/repos/__init__.py
index 3ef1fb4..628e9d6 100644
--- a/pygithub3/services/repos/__init__.py
+++ b/pygithub3/services/repos/__init__.py
@@ -11,7 +11,7 @@ from .watchers import Watchers
from .hooks import Hooks
-class Repos(Service):
+class Repo(Service):
""" Consume `Repos API <http://developer.github.com/v3/repos>`_ """
def __init__(self, **config):
@@ -22,7 +22,7 @@ class Repos(Service):
self.keys = Keys(**config)
self.watchers = Watchers(**config)
self.hooks = Hooks(**config)
- super(Repos, self).__init__(**config)
+ super(Repo, self).__init__(**config)
def list(self, user=None, type='all'):
""" Get user's repositories
@@ -133,7 +133,7 @@ class Repos(Service):
return self.__list_contributors(user, repo)
def list_contributors_with_anonymous(self, user=None, repo=None):
- """ Like :attr:`~pygithub3.services.repos.Repos.list_contributors` plus
+ """ Like :attr:`~pygithub3.services.repos.Repo.list_contributors` plus
anonymous """
return self.__list_contributors(user, repo, anom=True)
diff --git a/pygithub3/tests/services/test_repos.py b/pygithub3/tests/services/test_repos.py
index e77cc90..e21d474 100644
--- a/pygithub3/tests/services/test_repos.py
+++ b/pygithub3/tests/services/test_repos.py
@@ -5,7 +5,7 @@ import requests
from mock import patch, Mock
from pygithub3.tests.utils.core import TestCase
-from pygithub3.services.repos import (Repos, Collaborators, Commits, Downloads,
+from pygithub3.services.repos import (Repo, Collaborators, Commits, Downloads,
Forks, Keys, Watchers, Hooks)
from pygithub3.resources.base import json
from pygithub3.tests.utils.base import (mock_response, mock_response_result,
@@ -20,7 +20,7 @@ json.loads = Mock(side_effect=mock_json)
class TestRepoService(TestCase):
def setUp(self):
- self.rs = Repos()
+ self.rs = Repo()
self.rs.set_user('octocat')
self.rs.set_repo('octocat_repo')