Enable mypy disallow_untyped_defs (#2609)

This commit is contained in:
Trim21
2023-07-14 21:47:24 +02:00
committed by GitHub
parent 8816889a7d
commit 294c0cc9c5
130 changed files with 597 additions and 412 deletions
+4 -2
View File
@@ -29,6 +29,8 @@
# #
################################################################################
from typing import Any, Dict
import github.GithubObject
from github.GithubObject import Attribute
@@ -45,7 +47,7 @@ class UserKey(github.GithubObject.CompletableGithubObject):
self._url: Attribute[str] = github.GithubObject.NotSet
self._verified: Attribute[bool] = github.GithubObject.NotSet
def __repr__(self):
def __repr__(self) -> str:
return self.get__repr__({"id": self._id.value, "title": self._title.value})
@property
@@ -80,7 +82,7 @@ class UserKey(github.GithubObject.CompletableGithubObject):
"""
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
def _useAttributes(self, attributes) -> None:
def _useAttributes(self, attributes: Dict[str, Any]) -> None:
if "id" in attributes: # pragma no branch
self._id = self._makeIntAttribute(attributes["id"])
if "key" in attributes: # pragma no branch