Skip to content

Commit

Permalink
fix: use property instead of NewType(...) to fix type annotations…
Browse files Browse the repository at this point in the history
… for ApplicationContext attributes (Pycord-Development#2636)

Signed-off-by: Jässin Aouani <[email protected]>
Signed-off-by: Dorukyum <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Paillat <[email protected]>
Co-authored-by: Dorukyum <[email protected]>
Co-authored-by: Lala Sabathil <[email protected]>
  • Loading branch information
5 people authored and OmLanke committed Dec 16, 2024
1 parent eef433f commit 3c8a104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#2624](https://github.com/Pycord-Development/pycord/pull/2624))
- Fixed `AttributeError` when accessing `Member.guild_permissions` for user installed
apps. ([#2650](https://github.com/Pycord-Development/pycord/pull/2650))
- Fixed type annotations of cached properties.
([#2635](https://github.com/Pycord-Development/pycord/issues/2635))

### Changed

Expand Down
3 changes: 1 addition & 2 deletions discord/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
Iterator,
Literal,
Mapping,
NewType,
Protocol,
Sequence,
TypeVar,
Expand Down Expand Up @@ -151,7 +150,7 @@ def __get__(self, instance, owner):
class _RequestLike(Protocol):
headers: Mapping[str, Any]

cached_property = NewType("cached_property", property)
cached_property = property

P = ParamSpec("P")

Expand Down

0 comments on commit 3c8a104

Please sign in to comment.