We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello! we recently updated to lxml-stubs 0.4.0 (using lxml 4.9.1) and got the following complaint from mypy:
lxml-stubs 0.4.0
html_tree = fromstring(content) title = html_tree.xpath("//title/text()") len(title)
Checking the type of title I got: list[_ElementUnicodeResult]
title
list[_ElementUnicodeResult]
But mypy complains:
error: Argument 1 to "len" has incompatible type "Union[bool, float, Union[_ElementUnicodeResult, _PyElementUnicodeResult, _ElementStringResult], Union[str, bytes], List[Union[_Element, Union[_ElementUnicodeResult, _PyElementUnicodeResult, _ElementStringResult], Union[str, bytes], Tuple[Union[str, bytes, None], Union[str, bytes, None]]]]]"; expected "Sized"
This problem is also in 0.3.1, so we had to downgrade to 0.2.0 where this problem is not present.
0.3.1
0.2.0
wondering if this is a bug to be solved? Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello! we recently updated to
lxml-stubs 0.4.0
(using lxml 4.9.1) and got the following complaint from mypy:Checking the type of
title
I got:list[_ElementUnicodeResult]
But mypy complains:
This problem is also in
0.3.1
, so we had to downgrade to0.2.0
where this problem is not present.wondering if this is a bug to be solved?
Thanks!
The text was updated successfully, but these errors were encountered: