-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: async cache and object rewrite #1185
Draft
alentoghostflame
wants to merge
6
commits into
nextcord:master
Choose a base branch
from
alentoghostflame:guildless_recache
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat!: async cache and object rewrite #1185
alentoghostflame
wants to merge
6
commits into
nextcord:master
from
alentoghostflame:guildless_recache
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Alex Schoenhofen <[email protected]>
Skelmis
reviewed
May 21, 2024
EmmmaTech
changed the title
!feat: async cache and object rewrite
feat!: async cache and object rewrite
May 21, 2024
spifory
suggested changes
May 21, 2024
nextcord/message.py
Outdated
|
||
def __repr__(self) -> str: | ||
name = self.__class__.__name__ | ||
return f"<{name} id={self.id} channel_id={self.channel_id} type={self.type}>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
return f"<{name} id={self.id} channel_id={self.channel_id} type={self.type}>" | |
return f"<{name} id={self.id!r} channel_id={self.channel_id!r} type={self.type!r}>" |
Comment on lines
551
to
554
if inspect.iscoroutinefunction(func): | ||
await func(data) | ||
else: | ||
func(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this just utils.maybe_coro
?
Signed-off-by: Alex Schoenhofen <[email protected]>
alentoghostflame
force-pushed
the
guildless_recache
branch
from
May 21, 2024 17:30
4b5907c
to
7fde7e2
Compare
EmmmaTech
reviewed
May 22, 2024
return self._members.pop((member_id, guild_id)) is not None | ||
|
||
async def get_member(self, member_id: int, guild_id: int) -> Optional[MemberData]: | ||
return self._members.get((member_id, guild_id), None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually None
is the default for dict.get
.
Signed-off-by: Alex Schoenhofen <[email protected]>
alentoghostflame
force-pushed
the
guildless_recache
branch
from
May 24, 2024 03:14
a4bd804
to
a0058aa
Compare
Signed-off-by: Alex Schoenhofen <[email protected]>
alentoghostflame
force-pushed
the
guildless_recache
branch
from
May 31, 2024 05:08
b92425e
to
b6c1af7
Compare
Signed-off-by: Alex Schoenhofen <[email protected]>
Signed-off-by: Alex Schoenhofen <[email protected]>
EmmmaTech
added
t: enhancement
Type: enhancement - new feature or request
s: in progress
Status: the issue or PR is in development/progress
p: high
Priority: high - should be worked on as soon as reasonable
t: refactor
Type: refactor - this is a code change but does not fix a bug/add features
3.0
The issue/PR should go for the 3.0 release
labels
Jun 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.0
The issue/PR should go for the 3.0 release
p: high
Priority: high - should be worked on as soon as reasonable
s: in progress
Status: the issue or PR is in development/progress
t: enhancement
Type: enhancement - new feature or request
t: refactor
Type: refactor - this is a code change but does not fix a bug/add features
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR aims to
To say this is in progress is an understatement. It will likely be quite a while before anything here is relatively usable, let alone useful. This is being published so people can monitor this and raise issues about the architecture before I dive too far into the wrong direction.
This is a Code Change
task pyright
and fixed the relevant issues.