Include return type annotation in `Encoding` class properties?
It would be tremendously helpful if you could include the return type information as an annotation. The information is already included in the docstring, so would it be possible to generate these with proper annotations?
https://github.com/huggingface/tokenizers/blob/b0ee27847ffefef7de89b9f69ff5244cb0be6428/bindings/python/py_src/tokenizers/init.pyi#L69-L86
Additionally, convention for stub files is to use an ellipse ... instead of pass for empty bodies, but that's just a nit pick :)
Thank you!
@willfrey Thanks for the info.
Currently we cannot include type annotations because the source also supportssignature(fn) and help(fn) (in notebooks, REPLs) and those don't work properly with type annotations. Also type annotations usually require imports and that would need even more logic (Everything within those files is generated from rust, so the python information is scarce).
There might be way to do everything a bit better for sure though. Just adding information on why it isn't already done.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.