mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Set line length to 120 characters (#2599)
This commit is contained in:
+5
-15
@@ -122,13 +122,9 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
if self._repository is github.GithubObject.NotSet:
|
||||
# The repository was not set automatically, so it must be looked up by url.
|
||||
repo_url = "/".join(
|
||||
self.url.split("/")[:6]
|
||||
) # pragma no cover (Should be covered)
|
||||
repo_url = "/".join(self.url.split("/")[:6]) # pragma no cover (Should be covered)
|
||||
self._repository = github.GithubObject._ValuedAttribute(
|
||||
github.Repository.Repository(
|
||||
self._requester, self._headers, {"url": repo_url}, completed=False
|
||||
)
|
||||
github.Repository.Repository(self._requester, self._headers, {"url": repo_url}, completed=False)
|
||||
) # pragma no cover (Should be covered)
|
||||
return self._repository.value
|
||||
|
||||
@@ -199,17 +195,13 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
self._html_url = self._makeStringAttribute(attributes["html_url"])
|
||||
if "license" in attributes: # pragma no branch
|
||||
self._license = self._makeClassAttribute(
|
||||
github.License.License, attributes["license"]
|
||||
)
|
||||
self._license = self._makeClassAttribute(github.License.License, attributes["license"])
|
||||
if "name" in attributes: # pragma no branch
|
||||
self._name = self._makeStringAttribute(attributes["name"])
|
||||
if "path" in attributes: # pragma no branch
|
||||
self._path = self._makeStringAttribute(attributes["path"])
|
||||
if "repository" in attributes: # pragma no branch
|
||||
self._repository = self._makeClassAttribute(
|
||||
github.Repository.Repository, attributes["repository"]
|
||||
)
|
||||
self._repository = self._makeClassAttribute(github.Repository.Repository, attributes["repository"])
|
||||
if "sha" in attributes: # pragma no branch
|
||||
self._sha = self._makeStringAttribute(attributes["sha"])
|
||||
if "size" in attributes: # pragma no branch
|
||||
@@ -219,6 +211,4 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
if "url" in attributes: # pragma no branch
|
||||
self._url = self._makeStringAttribute(attributes["url"])
|
||||
if "text_matches" in attributes: # pragma no branch
|
||||
self._text_matches = self._makeListOfDictsAttribute(
|
||||
attributes["text_matches"]
|
||||
)
|
||||
self._text_matches = self._makeListOfDictsAttribute(attributes["text_matches"])
|
||||
|
||||
Reference in New Issue
Block a user