Rapptz
88d825a803
Allow use of orjson instead of json
The difference in speed seems negligible at start up, which is when
most time is taken for actually parsing JSON. I could potentially be
missing something but profiling didn't point to any discernable
difference.
4 years ago
Rapptz
4152819a3c
Ignore linting error when accessing Python 3.10 unions
4 years ago
Rapptz
2ce44f7bd6
Add versionadded for format_dt
4 years ago
Rapptz
d1a2ee4620
Add discord.utils.format_dt helper function
4 years ago
Soheab
dbb135b81a
Add disable_guild_select to utils.oauth_url()
4 years ago
Rapptz
fc66c5b92d
Fix some webhook related type checker errors
4 years ago
Rapptz
aeb2cfb573
Add private get_slots utility to get slots through MRO
4 years ago
Rapptz
3c90f16bf0
Fix cached_slot_property typings again
4 years ago
Sebastian Law
8bc489dba8
[tasks] Add support for explicit time parameter
4 years ago
Rapptz
de965c2bf5
Simplify SnowflakeList type hints
4 years ago
Josh
3864fb37a0
Fix various reference issues in documentation
Co-Authored-By: Riley Shaw <[email protected] >
4 years ago
Rapptz
7bad27d215
Fix SnowflakeList typings
4 years ago
Rapptz
cd7357b93a
Add classproperty helper utility
This is apparently a 3.9+ only addition
4 years ago
Rapptz
4c97b8efdd
Fix typings for utils._parse_ratelimit_header
A CIMultiDict is not a Dict but a Mapping
4 years ago
Rapptz
7b8db49efe
Fix utils.MISSING not evaluating to True in implicit bool contexts
4 years ago
Nadir Chowdhury
c786a85a9b
Add utils.MISSING
4 years ago
Olivia
a2df6e81b8
[commands] Update error message for Literal float/complex
4 years ago
Rapptz
9f3551926a
Split annotation resolution to discord.utils
4 years ago
Josh
3c2674725a
Add as_chunks helper function
4 years ago
Josh
e5607822d3
Define utils.cached_property in if TYPE_CHECKING guard
4 years ago
Rapptz
ac7588f735
Fix some typings in utils
4 years ago
Rapptz
3c8d3ab078
Add a third overload to parse_time
Apparently this behaviour is intended in Pyright
https://github.com/microsoft/pyright/issues/1772
Despite mypy behaving as intended.
4 years ago
Rapptz
bee6402d84
Fix utils.find predicate typing to accept Any
4 years ago
Rapptz
417353da4d
Fix up _unique and valid_icon_size implementations
4 years ago
Rapptz
b35596f7c8
Add typings for discord.utils
4 years ago
Rapptz
cc4dced7c0
Cleanup some of the prior typings for cached_slot_property
4 years ago
Nadir Chowdhury
18badbc60f
Add typing for `utils.cached(_slot)_property`
4 years ago
Maya
0f3f2cbeea
Fix spelling error in utils.__all__
4 years ago
Nadir Chowdhury
3e92196a2b
Add typings for audit logs, integrations, and webhooks
4 years ago
Nadir Chowdhury
89456022cf
Add `__all__` to remaining modules
4 years ago
Rapptz
7e3c5f3faf
Fix some regressions from create_task change
4 years ago
Nadir Chowdhury
2ff24a27b5
Use `asyncio.create_task` over `asyncio.ensure_future`
4 years ago
Rapptz
a3a6f88936
Add discord.utils.utcnow() helper function to ease migration
4 years ago
Rapptz
93a92e6e1b
Remove special casing of MAX_ASYNCIO_SECONDS in sleep_until
This compatibility code goes away in Python versions greater than 3.7
4 years ago
Rapptz
ff7094ce96
Convert datetimes to aware datetimes with UTC.
Naive datetimes will now be interpreted as local time throughout
the library.
4 years ago
Rapptz
9d39b135f4
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
4 years ago
Sebastian Law
d6501159e7
[docs] copy signature from overridden and inherited methods
4 years ago
Edwin
31ee3fafc1
Add remove_markdown helper function
4 years ago
Nihaal Sangha
a4d29e8cfd
Add scopes to utils.oauth_url
4 years ago
Nihaal Sangha
a3f700c11f
Fix references to snowflakes being max 21 long
4 years ago
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
4 years ago
Rapptz
abfc07f968
Fix up previous PR mistake with intentional backslashes
4 years ago
Sebastian Law
a0c1d6f6c5
Fix backslashes showing up in the docs
4 years ago
Nihaal Sangha
69bdc3a184
Change copyright year to present
4 years ago
Nadir Chowdhury
6b803acde4
[chore] Remove redundant imports
This also removes the historical patch for NullHandler implemented in bbf1c54
, as it has been available since Python 3.1.
4 years ago
Rapptz
d9acc2f491
Escape multi-line quotes properly
Fix #5897
5 years ago
ChristopherJHart
f308f34db1
Add note pointing to discord.AllowedMentions
5 years ago
Nadir Chowdhury
6d88316767
Fix NameError with resolving codes with Template
5 years ago
Rapptz
4de01212a4
Fix detection of some JPEG images without JFIF or Exif info
Closes #5143
5 years ago
NCPlayz
3408695a37
[docs] fix reference to `Guild` and document `utils.resolve_template`
5 years ago