Lint Action
7513c2138f
Fix code style issues with Black
2021-09-05 21:34:20 +00:00
Rapptz
490bbffc93
Remove in-place edits and return fresh instances instead
...
Fixes #4098
2021-08-23 23:46:50 -04:00
Rapptz
17f0b59c76
Move explanation note for type ignore above the offending line
2021-08-18 01:24:15 -04:00
Rapptz
28ed599345
Fix Template.source_guild typehint
2021-08-18 01:23:17 -04:00
Stocker
e79a648987
Add missing typehints to template.py
2021-08-18 01:17:20 -04:00
Rapptz
ecf239d2a2
Fix user cache acting incorrectly with evictions
...
The first issue involved copied users which would lead to user updates
causing faster evictions of the cache than was expected.
The second issue involved users that weren't bound to an internal
lifetime eviction policy. These users would not get evicted.
For example, a user without mutual guilds or being part of the internal
cache in general (messages, DMs) would never end up being evicted for
some strange reason. To handle this case, store_user would get a
counterpart named create_user which would create a user without
potentially storing them in the cache. That way only users with a
bound lifetime within the library would be stored.
2021-07-29 01:43:23 -04:00
Rapptz
62b024803a
Mock PartialTemplateState._get_guild as pass-through
2021-06-29 21:35:00 -04:00
Rapptz
b1a355394f
Rework Template.edit to use MISSING sentinel
2021-06-29 21:33:57 -04:00
Sebastian Law
124c4a3919
Add Template.url
2021-05-12 06:38:26 -04:00
Nadir Chowdhury
157801bc90
Add Template.is_dirty
2021-04-21 23:22:22 -04:00
Rapptz
d58edd10a7
Add missing future annotations import
2021-04-10 03:23:47 -04:00
Nadir Chowdhury
1efdef3ac3
Add typings for invites, templates, and bans
2021-04-10 02:55:10 -04:00
Rapptz
99fc950510
Use f-strings in more places that were missed.
2021-04-08 06:02:47 -04:00
Rapptz
ff7094ce96
Convert datetimes to aware datetimes with UTC.
...
Naive datetimes will now be interpreted as local time throughout
the library.
2021-04-04 23:54:08 -04:00
Rapptz
54288879e2
Remove userbot functionality
...
This has a lot of legacy and cruft so there may be some stuff I've
missed but this first pass is enough to get a clear separation.
2021-04-04 10:15:30 -04:00
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`.
2021-04-04 07:03:53 -04:00
Nadir Chowdhury
7d345e8e4e
remove trailing whitespace
2021-03-13 00:42:25 -05:00
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
2021-02-24 21:26:51 -05:00
Nadir Chowdhury
fb773dc1dd
Add remaining template endpoints
2021-02-23 03:58:03 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present
2021-01-15 05:28:11 -05:00
Rapptz
431ee8794b
Fix error with templates not having access to member cache flags.
...
This also changes the attribute from having an underscore
Fix #5986
2020-11-21 22:42:59 -05:00
apple502j
fb5359f028
Add missing comma in template.py
2020-08-05 21:40:16 -04:00
Xua
a1d6ff82dd
Fix NameError and AttributeError in Template and Integrations
2020-08-05 05:48:42 -04:00
Riley S
b2065c92df
Fix typo when creating a guild via template
2020-07-31 21:09:04 -04:00
NCPlayz
3408695a37
[docs] fix reference to Guild
and document utils.resolve_template
2020-07-08 23:01:00 -04:00
James
61216112d0
Add a licence and encoding declaration to missing files
2020-07-08 23:01:00 -04:00
Skezza
c3bca7ec73
Documentation formatting
2020-06-30 23:32:00 -04:00
Nadir Chowdhury
2b3c6e0d47
Add support for Discord templates
2020-06-28 14:48:04 -04:00