Skip to content

Typing issues for get() #325

@wRAR

Description

@wRAR

Previously Selector.get() could only return a string, now with jmespath it can return anything. Some of the type hints were updated from str to Any following this, but not all. Strictly speaking, all of these functions should return object (list[object] etc.) and code that assumes that they return strings should fail typing checks. This sounds suboptimal though, maybe ideally strings should be inferred when the selector is CSS or XPath (no idea if that's possible).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions