mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Format with new black (#1679)
Black is very opinionated, but sometimes those opinions change. Run the new black version across the codebase, and lock down the version used by pre-commit so we don't get surprised like this again.
This commit is contained in:
+11
-4
@@ -844,7 +844,8 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if isinstance(collaborator, github.NamedUser.NamedUser):
|
||||
collaborator = collaborator._identity
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"GET", self.url + "/collaborators/" + collaborator + "/permission",
|
||||
"GET",
|
||||
self.url + "/collaborators/" + collaborator + "/permission",
|
||||
)
|
||||
return data["permission"]
|
||||
|
||||
@@ -1876,7 +1877,9 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if description is not github.GithubObject.NotSet:
|
||||
post_parameters["description"] = description
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"POST", self.url + "/deployments", input=post_parameters,
|
||||
"POST",
|
||||
self.url + "/deployments",
|
||||
input=post_parameters,
|
||||
)
|
||||
return github.Deployment.Deployment(
|
||||
self._requester, headers, data, completed=True
|
||||
@@ -2245,7 +2248,9 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if organization is not github.GithubObject.NotSet:
|
||||
post_parameters["organization"] = organization
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"POST", self.url + "/forks", input=post_parameters,
|
||||
"POST",
|
||||
self.url + "/forks",
|
||||
input=post_parameters,
|
||||
)
|
||||
return Repository(self._requester, headers, data, completed=True)
|
||||
|
||||
@@ -2790,7 +2795,9 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
import_header = {"Accept": Consts.mediaTypeImportPreview}
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"GET", self.url + "/import", headers=import_header,
|
||||
"GET",
|
||||
self.url + "/import",
|
||||
headers=import_header,
|
||||
)
|
||||
if not data:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user