-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
feat from #1856 |
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
still not ready have some bug like : NameError: name 'VoiceChannel' is not defined |
@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 ? |
… get_or_fetch shortcut Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
Signed-off-by: Lumouille <[email protected]>
should be ready for review |
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 |
Co-authored-by: Soheab <[email protected]> Signed-off-by: Lumouille <[email protected]>
Merge conflicts again 😂 |
object_type: type[_FETCHABLE], | ||
object_id: int | None, | ||
default: _D = None, | ||
) -> _FETCHABLE | _D | 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.
These type vars don't have to and should not be imported from utils afaik, also no need to type self.
Also because some things can't be getorfetched from Client vs Guild so they should have their own _FETCHABLE
that is bound to a subset of the base one.
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.
we talked about it with plun and he suggests me to import it from utils
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.
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.
I am not sure about that. @plun1331 what's your reasoning ?
Co-authored-by: Paillat <[email protected]> Signed-off-by: Lumouille <[email protected]>
Summary
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.