Enable mypy check_untyped_defs (#2607)

This commit is contained in:
Trim21
2023-07-14 14:49:28 +02:00
committed by GitHub
parent 13e178a3ab
commit 8816889a7d
19 changed files with 215 additions and 310 deletions
+6 -6
View File
@@ -22,16 +22,20 @@
from __future__ import annotations
import github.GithubObject
import github.NamedUser
import github.Team
from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
class EnvironmentProtectionRuleReviewer(github.GithubObject.NonCompletableGithubObject):
class EnvironmentProtectionRuleReviewer(NonCompletableGithubObject):
"""
This class represents a reviewer for an EnvironmentProtectionRule. The reference can be found here https://docs.github.com/en/rest/reference/deployments#environments
"""
def _initAttributes(self):
self._type: Attribute[str] = NotSet
self._reviewer: Attribute[github.NamedUser.NamedUser | github.Team.Team] = NotSet
def __repr__(self):
return self.get__repr__({"type": self._type.value})
@@ -43,10 +47,6 @@ class EnvironmentProtectionRuleReviewer(github.GithubObject.NonCompletableGithub
def reviewer(self) -> github.NamedUser.NamedUser | github.Team.Team:
return self._reviewer.value
def _initAttributes(self):
self._type = github.GithubObject.NotSet
self._reviewer = github.GithubObject.NotSet
def _useAttributes(self, attributes):
if "type" in attributes: # pragma no branch
self._type = self._makeStringAttribute(attributes["type"])