mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
bs4: Make Tag.attrs more permissive (#11487)
Make `Tag.attrs` more permissive to be in line with actual code `Tag.attrs` is a dict can technically have `list[str]` as a valid value, not just `str`. Making the value type a union with `Any` allows `list[str]` to be valid in a type checker's eyes if a user narrows it. Based on discussion in, and fixes, #8755.
This commit is contained in:
@@ -234,7 +234,7 @@ class Tag(PageElement):
|
||||
sourceline: int | None
|
||||
sourcepos: int | None
|
||||
known_xml: bool | None
|
||||
attrs: dict[str, str]
|
||||
attrs: dict[str, str | Any]
|
||||
contents: list[PageElement]
|
||||
hidden: bool
|
||||
can_be_empty_element: bool | None
|
||||
|
||||
Reference in New Issue
Block a user