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
nsmap argument of Element function is of type Optional[_NSMapArg] where _NSMapArg is Mapping[str, str].
nsmap
Optional[_NSMapArg]
_NSMapArg
Mapping[str, str]
But according to the documentation here namespace key for the default namespace supposed to be None:
None
... >>> NSMAP = {None : XHTML_NAMESPACE} # the default namespace (no prefix) >>> xhtml = etree.Element(XHTML + "html", nsmap=NSMAP) # lxml only! ...
So it seems like _NSMapArg should be Mapping[Optional[str], str]
Mapping[Optional[str], str]
The text was updated successfully, but these errors were encountered:
I also just encountered this issue, and agree that the documentation disagrees with the type stubs.
Sorry, something went wrong.
No branches or pull requests
nsmap
argument of Element function is of typeOptional[_NSMapArg]
where_NSMapArg
isMapping[str, str]
.But according to the documentation here namespace key for the default namespace supposed to be
None
:So it seems like
_NSMapArg
should beMapping[Optional[str], str]
The text was updated successfully, but these errors were encountered: