typeshed
typeshed copied to clipboard
xml typing incomplete
While using mypy wit typeshed I noticed that some xml.minidom functions return values are annotated as .... I am no guru with the typing system, but I think here it is used as a placeholder. E.g. the createDocument returns a Document instance(I validated this with the std implementation code on my side), but is annotated with an ellipsis.
Are these simply still missing or is this on purpose? Excuse me if there is a typeshed todo list somewhere that I missed.
The xml stubs are indeed incomplete. The marker for a missing return type is not ..., though, but the missing -> operator. For example:
def createDocumentFragment(self): ... # no return type
def createDocumentFragment(self) -> Whatever: ... # with return type
Any improvements are welcome!
I see, that makes sense. I can probably add typing for a few functions, but I am not very experienced with this module.