diff --git a/github/Consts.py b/github/Consts.py index 7f32628c..5283101d 100644 --- a/github/Consts.py +++ b/github/Consts.py @@ -21,7 +21,7 @@ # # ################################################################################ -# #189: Line endings should be linux style +# #193: Line endings should be linux style # TODO: As of Thu Aug 21 22:40:13 (BJT) Chinese Standard Time 2013 # lots of consts in this project are explict diff --git a/github/GithubObject.py b/github/GithubObject.py index 25e81c77..92efb7f2 100644 --- a/github/GithubObject.py +++ b/github/GithubObject.py @@ -100,17 +100,17 @@ class GithubObject(object): else: return datetime.datetime.strptime(s, "%Y-%m-%dT%H:%M:%SZ") - def save(self, file_name): # #189: Could we use file-like objects? It would be more "pythonic" than passing filenames. + def save(self, file_name): # #193: Could we use file-like objects? It would be more "pythonic" than passing filenames. ''' Save instance to a file :param file_name: the full path of target file ''' with open(file_name, 'wb') as f: - pickle.dump(self, f) # #189: This will also save self._requester, and the login/password of the user. She might not appriciate. - # #189: May be better to pickle only self._rawData and self._headers and restore the object with Github.create_from_raw_data + pickle.dump(self, f) # #193: This will also save self._requester, and the login/password of the user. She might not appriciate. + # #193: May be better to pickle only self._rawData and self._headers and restore the object with Github.create_from_raw_data - @classmethod # #189: Could be a @staticmethod? The docstring would be simpler (no need to explain the type will be same as saved). - def load(cls, file_name): # #189: Could we use file-like objects? It would be more "pythonic" than passing filenames. + @classmethod # #193: Could be a @staticmethod? The docstring would be simpler (no need to explain the type will be same as saved). + def load(cls, file_name): # #193: Could we use file-like objects? It would be more "pythonic" than passing filenames. ''' Load saved instance from file :param file_name: the full path to saved file @@ -154,7 +154,7 @@ class GithubObject(object): self._storeAndUseAttributes(data) self.__completed = True return True - except GithubException.NotModifiedException: # #189: Why raise and catch? Can't we just check? + except GithubException.NotModifiedException: # #193: Why raise and catch? Can't we just check? return False diff --git a/github/Requester.py b/github/Requester.py index abd224fd..9ac335e6 100644 --- a/github/Requester.py +++ b/github/Requester.py @@ -290,8 +290,8 @@ class Requester: requestHeaders["Authorization"] = self.__authorizationHeader def __conditional(self, requestHeaders, parameters): - # #189: Why pass etag and last_modified by param "parameters"? - # #189: May be better to add a specific param "headers" to methods requestFoobar? + # #193: Why pass etag and last_modified by param "parameters"? + # #193: May be better to add a specific param "headers" to methods requestFoobar? etag = parameters.get(Consts.REQ_IF_NONE_MATCH) last_modified = parameters.get(Consts.REQ_IF_MODIFIED_SINCE) if etag is not None: diff --git a/github/tests/ConditionalRequestUpdate.py b/github/tests/ConditionalRequestUpdate.py index 63121e72..6ac38c98 100644 --- a/github/tests/ConditionalRequestUpdate.py +++ b/github/tests/ConditionalRequestUpdate.py @@ -21,7 +21,7 @@ # # ################################################################################ -# #189: Line endings should be linux style +# #193: Line endings should be linux style import Framework import github @@ -31,7 +31,7 @@ class ConditionalRequestUpdate(Framework.TestCase): def setUp(self): Framework.TestCase.setUp(self) self.repo = self.g.get_repo("akfish/PyGithub") - # #189: Let's separate this assert in its own test method, remove it from setUp. + # #193: Let's separate this assert in its own test method, remove it from setUp. # Not updated self.assertFalse(self.repo.update(), msg="The repo is not changes. But update() != False") diff --git a/github/tests/_record_.py b/github/tests/_record_.py index 38aa0745..ffd32409 100644 --- a/github/tests/_record_.py +++ b/github/tests/_record_.py @@ -28,7 +28,7 @@ import github.tests.Framework import github.tests.AllTests -# #189: This seems equivalent to "python -m github.tests ClassName.methodName --record" +# #193: This seems equivalent to "python -m github.tests ClassName.methodName --record" def main(argv):