From 131aeeab3f4a5f6f3c88ea8077eb628af6615b45 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Sat, 29 Dec 2012 08:23:58 +0100 Subject: [PATCH] Fix tests and some doc --- github/Github.py | 6 ++---- github/InputFileContent.py | 2 -- github/InputGitAuthor.py | 2 -- github/InputGitTreeElement.py | 6 ++---- github/__init__.py | 2 +- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/github/Github.py b/github/Github.py index 53d6a881..15214d40 100644 --- a/github/Github.py +++ b/github/Github.py @@ -35,8 +35,6 @@ DEFAULT_TIMEOUT = 10 class Github(object): def __init__(self, login_or_token=None, password=None, base_url=DEFAULT_BASE_URL, timeout=DEFAULT_TIMEOUT, client_id=None, client_secret=None, user_agent=None): """ - Please edit this generated docstring for method :func:`Github.__init__`. - :param login_or_token: string :param password: string :param base_url: string @@ -48,8 +46,8 @@ class Github(object): assert login_or_token is None or isinstance(login_or_token, (str, unicode)), login_or_token assert password is None or isinstance(password, (str, unicode)), password - assert base_url is None or isinstance(base_url, (str, unicode)), base_url - assert timeout is None or isinstance(timeout, (int, long)), timeout + assert isinstance(base_url, (str, unicode)), base_url + assert isinstance(timeout, (int, long)), timeout assert client_id is None or isinstance(client_id, (str, unicode)), client_id assert client_secret is None or isinstance(client_secret, (str, unicode)), client_secret assert user_agent is None or isinstance(user_agent, (str, unicode)), user_agent diff --git a/github/InputFileContent.py b/github/InputFileContent.py index 505bde62..035ecbf3 100644 --- a/github/InputFileContent.py +++ b/github/InputFileContent.py @@ -17,8 +17,6 @@ class InputFileContent(object): def __init__(self, content): """ - Please edit this generated docstring for method :func:`github.InputFileContent.InputFileContent.__init__`. - :param content: string """ diff --git a/github/InputGitAuthor.py b/github/InputGitAuthor.py index b4edef9e..3f3da182 100644 --- a/github/InputGitAuthor.py +++ b/github/InputGitAuthor.py @@ -17,8 +17,6 @@ class InputGitAuthor(object): def __init__(self, name, email, date): """ - Please edit this generated docstring for method :func:`github.InputGitAuthor.InputGitAuthor.__init__`. - :param name: string :param email: string :param date: string diff --git a/github/InputGitTreeElement.py b/github/InputGitTreeElement.py index 8a233366..36436928 100644 --- a/github/InputGitTreeElement.py +++ b/github/InputGitTreeElement.py @@ -19,8 +19,6 @@ import github.GithubObject class InputGitTreeElement(object): def __init__(self, path, mode, type, content=github.GithubObject.NotSet, sha=github.GithubObject.NotSet): """ - Please edit this generated docstring for method :func:`github.InputGitTreeElement.InputGitTreeElement.__init__`. - :param path: string :param mode: string :param type: string @@ -31,8 +29,8 @@ class InputGitTreeElement(object): assert isinstance(path, (str, unicode)), path assert isinstance(mode, (str, unicode)), mode assert isinstance(type, (str, unicode)), type - assert isinstance(content, (str, unicode)), content - assert isinstance(sha, (str, unicode)), sha + assert content is github.GithubObject.NotSet or isinstance(content, (str, unicode)), content + assert sha is github.GithubObject.NotSet or isinstance(sha, (str, unicode)), sha self.__path = path self.__mode = mode self.__type = type diff --git a/github/__init__.py b/github/__init__.py index f173c2dc..b6b0f178 100644 --- a/github/__init__.py +++ b/github/__init__.py @@ -30,7 +30,7 @@ from InputGitTreeElement import InputGitTreeElement def enable_console_debug_logging(): # pragma no cover """ - This function set up a very simple logging configuration (log everything on standard output) that is useful for troubleshooting. + This function sets up a very simple logging configuration (log everything on standard output) that is useful for troubleshooting. """ logger = logging.getLogger("github")