Skip to content

Commit 52ee8fb

Browse files
probablyjassinpre-commit-ci[bot]Paillat-devDorukyumLulalaby
authored
fix: use property instead of NewType(...) to fix type annotations for ApplicationContext attributes (#2636)
Signed-off-by: Jässin Aouani <123012687+probablyjassin@users.noreply.github.com> Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <jeremiecotti@ik.me> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: Lala Sabathil <lala@pycord.dev>
1 parent db5b466 commit 52ee8fb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ These changes are available on the `master` branch, but have not yet been releas
6262
([#2624](https://github.com/Pycord-Development/pycord/pull/2624))
6363
- Fixed `AttributeError` when accessing `Member.guild_permissions` for user installed
6464
apps. ([#2650](https://github.com/Pycord-Development/pycord/pull/2650))
65+
- Fixed type annotations of cached properties.
66+
([#2635](https://github.com/Pycord-Development/pycord/issues/2635))
6567

6668
### Changed
6769

discord/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
Iterator,
5757
Literal,
5858
Mapping,
59-
NewType,
6059
Protocol,
6160
Sequence,
6261
TypeVar,
@@ -151,7 +150,7 @@ def __get__(self, instance, owner):
151150
class _RequestLike(Protocol):
152151
headers: Mapping[str, Any]
153152

154-
cached_property = NewType("cached_property", property)
153+
cached_property = property
155154

156155
P = ParamSpec("P")
157156

0 commit comments

Comments
 (0)