mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Enable mypy check_untyped_defs (#2607)
This commit is contained in:
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user