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
|
||||
import github.Project
|
||||
import github.ProjectCard
|
||||
@@ -32,7 +34,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
This class represents Project Columns. The reference can be found here https://docs.github.com/en/rest/reference/projects#columns
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
def __repr__(self) -> str:
|
||||
return self.get__repr__({"name": self._name.value})
|
||||
|
||||
@property
|
||||
@@ -188,7 +190,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
self._useAttributes(data)
|
||||
|
||||
def _initAttributes(self):
|
||||
def _initAttributes(self) -> None:
|
||||
self._cards_url = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
@@ -198,7 +200,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
def _useAttributes(self, attributes: Dict[str, Any]) -> None:
|
||||
if "cards_url" in attributes: # pragma no branch
|
||||
self._cards_url = self._makeStringAttribute(attributes["cards_url"])
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
|
||||
Reference in New Issue
Block a user