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
@@ -42,9 +42,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
return self.get__repr__(
|
||||
{"number": self._number.value, "title": self._title.value}
|
||||
)
|
||||
return self.get__repr__({"number": self._number.value, "title": self._title.value})
|
||||
|
||||
@property
|
||||
def closed_issues(self):
|
||||
@@ -174,9 +172,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
assert isinstance(title, str), title
|
||||
assert state is github.GithubObject.NotSet or isinstance(state, str), state
|
||||
assert description is github.GithubObject.NotSet or isinstance(
|
||||
description, str
|
||||
), description
|
||||
assert description is github.GithubObject.NotSet or isinstance(description, str), description
|
||||
assert due_on is github.GithubObject.NotSet or isinstance(due_on, date), due_on
|
||||
post_parameters = {
|
||||
"title": title,
|
||||
@@ -187,9 +183,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
post_parameters["description"] = description
|
||||
if due_on is not github.GithubObject.NotSet:
|
||||
post_parameters["due_on"] = due_on.strftime("%Y-%m-%d")
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"PATCH", self.url, input=post_parameters
|
||||
)
|
||||
headers, data = self._requester.requestJsonAndCheck("PATCH", self.url, input=post_parameters)
|
||||
self._useAttributes(data)
|
||||
|
||||
def get_labels(self):
|
||||
@@ -197,9 +191,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
github.Label.Label, self._requester, f"{self.url}/labels", None
|
||||
)
|
||||
return github.PaginatedList.PaginatedList(github.Label.Label, self._requester, f"{self.url}/labels", None)
|
||||
|
||||
@property
|
||||
def _identity(self):
|
||||
@@ -226,9 +218,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
|
||||
if "creator" in attributes: # pragma no branch
|
||||
self._creator = self._makeClassAttribute(
|
||||
github.NamedUser.NamedUser, attributes["creator"]
|
||||
)
|
||||
self._creator = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["creator"])
|
||||
if "description" in attributes: # pragma no branch
|
||||
self._description = self._makeStringAttribute(attributes["description"])
|
||||
if "due_on" in attributes: # pragma no branch
|
||||
|
||||
Reference in New Issue
Block a user