mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Fix pep8 and coverage
This commit is contained in:
@@ -20,7 +20,7 @@ import GithubException
|
||||
|
||||
class _NotSetType:
|
||||
def __repr__(self):
|
||||
return "NotSet"
|
||||
return "NotSet" # pragma no cover
|
||||
NotSet = _NotSetType()
|
||||
|
||||
|
||||
|
||||
@@ -889,7 +889,7 @@ class Repository(github.GithubObject.GithubObject):
|
||||
None
|
||||
)
|
||||
return [
|
||||
github.ContentFile.ContentFile(self._requester, attributes, completed=attributes["type"]!="file") # Lazy completion only makes sense for files. See discussion here: https://github.com/jacquev6/PyGithub/issues/140#issuecomment-13481130
|
||||
github.ContentFile.ContentFile(self._requester, attributes, completed=(attributes["type"] != "file")) # Lazy completion only makes sense for files. See discussion here: https://github.com/jacquev6/PyGithub/issues/140#issuecomment-13481130
|
||||
for attributes in data
|
||||
]
|
||||
|
||||
|
||||
@@ -38,4 +38,8 @@ class Issue140(Framework.TestCase): # https://github.com/jacquev6/PyGithub/issu
|
||||
def testGetFileContents(self):
|
||||
contents = self.repo.get_file_contents("/js/bootstrap-affix.js")
|
||||
self.assertEqual(contents.encoding, "base64")
|
||||
self.assertEqual(contents.url, "https://api.github.com/repos/twitter/bootstrap/contents/js/bootstrap-affix.js")
|
||||
self.assertEqual(len(contents.content), 4722)
|
||||
|
||||
def testGetDirContentsWithRef(self):
|
||||
contents = self.repo.get_dir_contents("/js", "")
|
||||
|
||||
Reference in New Issue
Block a user