mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Enable mypy disallow_untyped_defs (#2609)
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
import github.GithubObject
|
||||
|
||||
|
||||
@@ -28,7 +30,7 @@ class WorkflowStep(github.GithubObject.CompletableGithubObject):
|
||||
This class represents steps in a Workflow Job. The reference can be found here https://docs.github.com/en/rest/reference/actions#workflow-jobs
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
def __repr__(self) -> str:
|
||||
return self.get__repr__({"number": self._number.value, "name": self._name.value})
|
||||
|
||||
@property
|
||||
@@ -79,7 +81,7 @@ class WorkflowStep(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._status)
|
||||
return self._status.value
|
||||
|
||||
def _initAttributes(self):
|
||||
def _initAttributes(self) -> None:
|
||||
self._completed_at = github.GithubObject.NotSet
|
||||
self._conclusion = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
@@ -87,7 +89,7 @@ class WorkflowStep(github.GithubObject.CompletableGithubObject):
|
||||
self._started_at = github.GithubObject.NotSet
|
||||
self._status = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
def _useAttributes(self, attributes: Dict[str, Any]) -> None:
|
||||
if "completed_at" in attributes: # pragma no branch
|
||||
self._completed_at = self._makeDatetimeAttribute(attributes["completed_at"])
|
||||
if "conclusion" in attributes: # pragma no branch
|
||||
|
||||
Reference in New Issue
Block a user