Skip to content

[bs4] Incorrect type hints for .__getitem__() and .get()? #8755

@ghost

Description

Tag.attrs is type-hinted as dict[str, str] as expected. However, Tag.__getitem__() is type hinted as returning str | list[str], and Tag.get() is type hinted as returning str | list[str] | None. Why is that the case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions