Skip to content

Commit 882fe44

Browse files
authored
Make NotSet an Attribute[Any] (#3057)
1 parent 193f699 commit 882fe44

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

github/GithubObject.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def _datetime_from_github_isoformat(value: str) -> datetime:
110110
return datetime.fromisoformat(value)
111111

112112

113-
class _NotSetType:
113+
class _NotSetType(Attribute[Any]):
114114
def __repr__(self) -> str:
115115
return "NotSet"
116116

@@ -209,14 +209,14 @@ def value(self) -> T:
209209
return self._value
210210

211211

212-
class _BadAttribute(Attribute):
212+
class _BadAttribute(Attribute[T]):
213213
def __init__(self, value: Any, expectedType: Any, exception: Exception | None = None):
214214
self.__value = value
215215
self.__expectedType = expectedType
216216
self.__exception = exception
217217

218218
@property
219-
def value(self) -> Any:
219+
def value(self) -> T:
220220
raise BadAttributeException(self.__value, self.__expectedType, self.__exception)
221221

222222

0 commit comments

Comments
 (0)