Missing `template` in stubs (pyi)
tdivis opened this issue · 2 comments
tdivis commented
As I upgraded to a newer version of python-xmlsec
, mypy
in my project started to report errors:
error: Module has no attribute "template" [attr-defined]
My code is working and looks like:
import xmlsec
...
xmlsec.template.add_x509_data(key_info)
I figured it's since ceaea9c as the line from xmlsec import constants, template, tree
was removed from src/xmlsec/__init__.pyi
and only constants
and tree
was returned in different forms of import, but template
seems to be forgotten.
tdivis commented
So how should we fix this? How are the stubs (re)generated? I didn't find any documentation about this. Is this automatic process or some manual work? Or should I simply create Pull Request wit added import of template
?
tdivis commented
I simply added it to the stub, please let me know if this is OK or I should use different approach.