-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore(refactor): replace string-based resource registration with direct method calls #4314
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: main
Are you sure you want to change the base?
Conversation
| pass | ||
|
|
||
|
|
||
| RESOURCES = [ |
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.
thank you! it was quite terrible
|
This pull request has merge conflicts that must be resolved before it can be merged. @mattf please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork |
ashwinb
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
leseb
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.
please resolve the conflicts
…ct method calls Remove RESOURCES list with string method names and replace with explicit typed calls for each resource type. Extract common registration logic into _register_resource helper with generic type parameters. - Add ListResourcesResponse[ResourceT] generic base class to resource.py - Update all list response types to inherit from generic base - Replace getattr-based method lookup with direct impl method calls - Add proper type hints using PEP 695 generics (InputT: BaseModel, ResourceT: Resource)
664c1ac to
94de40a
Compare
d919dc0 to
94de40a
Compare
What does this PR do?
Remove RESOURCES list with string method names and replace with explicit typed calls for each resource type. Extract common registration logic into _register_resource helper with generic type parameters.