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:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user