-
Notifications
You must be signed in to change notification settings - Fork 4
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: add base protocols for Resource and ResourceSequence #364
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
93e75eb
to
8eb0486
Compare
T = TypeVar("T", bound=Resource) | ||
|
||
|
||
class ResourceSequence(Protocol[T]): |
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
def __getitem__(self, key: Hashable) -> Any: ... | ||
|
||
|
||
class _Resource(dict, Resource): |
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.
This class is no longer needed, right?
Or maybe the methods of _Resource
and BaseResource
need to be merged?
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.
Correct. The BaseResource class should go away. But that likely requires finishing the migration to the new implicit subtyping pattern. Which I am planning to complete.
Co-authored-by: Barret Schloerke <barret@posit.co>
No description provided.