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

Allow for TagAttrs to accept a Tag's attrs #55

Merged
merged 5 commits into from
Nov 2, 2023
Merged

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented May 11, 2023

  • News
  • Test

@schloerke schloerke requested a review from wch May 11, 2023 19:56
@schloerke schloerke marked this pull request as ready for review May 11, 2023 19:57
@schloerke schloerke changed the title Allow for TaggAttrs to accept a Tag's attrs Allow for TagAttrs to accept a Tag's attrs May 16, 2023
@schloerke schloerke merged commit 2c92ea0 into main Nov 2, 2023
16 checks passed
@schloerke schloerke deleted the tag_attr_dict branch November 2, 2023 18:25
@wch
Copy link
Collaborator

wch commented Nov 2, 2023

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).

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

Successfully merging this pull request may close these issues.

2 participants