-
Notifications
You must be signed in to change notification settings - Fork 185
feat: implement get function
#801
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: implement get function
#801
Conversation
|
pre commit check will (hopefully) fail until webhook pr is merged |
Toricane
left a comment
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 didn't mean that...
Toricane
left a comment
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.
Looks good, just missing cache implementation.
Also, should getting a list of an object be implemented, or is that out of the scope of this?
For example, List[User], with a list of user IDs inputted, which returns a list of User objects.
|
I hate everything xD |
AstreaTSS
left a comment
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 find the number of double underscored variables to be excessive and unnecessary in this case, but that's a me thing.
Otherwise, the code looks good! I haven't tested it though - busy with some other things. I also likely have missed a couple of things, which is why I'm not giving it explicit approval.
I only made double underscores when single underscore was used already, no? (except the two functions) |
Co-authored-by: Max <[email protected]>
Co-authored-by: Max <[email protected]>
… of a tuple of tuples
|
Before I make a final review, I'd really like to discuss my disdain for This is going to obviously lead to an extremely messy and obfuscated pattern in the type hinting for numerous objects. Is there not any other way to assure to end-users that objects passed by the Discord API/Gateway are usable in this context? |
There are 9 overloads (what already is a massive reduction from the 36 we had before) and the typehints can be controlled via the |
i0bs
left a comment
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.
Long awaited, and after nearly a year of debating how to develop this, I'm giving it my seal of approval.
Toricane
left a comment
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.
LGTM!
About
This is a new approach for the
getmethod. It is now located in a separate file, so the@overloads don't mess another file up. Having an overload decorator for every object allows to precisely show the user what arguments he has to put in, and for us to do a simple**kwagrsinto the function that actually gets the objectChecklist
pre-committo format and lint the change(s) made.3.8.6and higher.