8000 feat: Implement better get_or_fetch by Lumabots · Pull Request #2776 · Pycord-Development/pycord · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Implement better get_or_fetch #2776

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

Open
wants to merge 70 commits into
base: master
Choose a base branch
from

Conversation

Lumabots
Copy link
Contributor
@Lumabots Lumabots commented May 3, 2025

Summary

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters). Implement better get_or_fetch #1856
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

Lumabots added 5 commits May 3, 2025 00:37
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lum
8000
ouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
@Lumabots
Copy link
Contributor Author
Lumabots commented May 3, 2025

feat from #1856

Lumabots and others added 5 commits May 4, 2025 01:30
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
@Lumabots
Copy link
Contributor Author
Lumabots commented May 3, 2025

still not ready have some bug like : NameError: name 'VoiceChannel' is not defined
ig because of the type checking, i'll have to find a way to import it without circular import

@Paillat-dev
Copy link
Contributor

@Lumabots You can import it inside of the function where 8000 you use it directly instead of importing it at the top

@Lumabots
Copy link
Contributor Author
Lumabots commented May 3, 2025

@Lumabots You can import it inside of the function where you use it directly instead of importing it at the top

Well ig the issue come from the definition for the typevar, so will that resolve it ?

Lumabots and others added 8 commits May 4, 2025 18:22
… get_or_fetch shortcut

Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
@Lumabots
Copy link
Contributor Author
Lumabots commented May 4, 2025

should be ready for review

@Lumabots
Copy link
Contributor Author
Lumabots commented May 4, 2025

just need to specify that this is breaking inside the changelog cos of modification of get_or_fetch and removal of get_or_fetch_user

Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
@Lumabots Lumabots requested a review from NeloBlivion May 15, 2025 18:44
Lumabots and others added 3 commits May 17, 2025 13:28
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
@Lumabots Lumabots requested a review from Paillat-dev May 17, 2025 10:30
Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
@Lumabots
Copy link
Contributor Author
Lumabots commented Jun 4, 2025

maybe i could also handle in case the id is none by just retuning None, this could help as a helper fonction to not have to check with a if ... is not None, what are your thoughts ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0