Skip to content
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

Make TagAttrs a Mapping #70

Open
schloerke opened this issue Nov 2, 2023 · 0 comments
Open

Make TagAttrs a Mapping #70

schloerke opened this issue Nov 2, 2023 · 0 comments
Assignees

Comments

@schloerke
Copy link
Collaborator

          I think a better way to go about this is to change `TagAttrs` from a `Dict` to a `Mapping`. (The reason it didn't accept a `TagAttrDict` as a `TagAttrs` object is because `Dict` is invariant, whereas `Mapping` is covariant.)
TagAttrs = Mapping[str, TagAttrValue]

There is also a place where you'll have to test for isinstance(x, Mapping) instead of isinstance(x, dict).

Originally posted by @wch in #55 (comment)

@schloerke schloerke self-assigned this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant