On 29 Jul 2022, at 19:33, Marco Sulla <Marco.Sulla.Python@gmail.com> wrote:
I tried to follow the instructions here:
https://mypy.readthedocs.io/en/stable/stubgen.html
but the instructions about creating a stub for a C Extension are a little mysterious. I tried to use it on the .so file without luck.
--
https://mail.python.org/mailman/listinfo/python-list
On 29 Jul 2022, at 19:33, Marco Sulla <Marco.Sulla.Python@gmail.com> wrote:
I tried to follow the instructions here:
https://mypy.readthedocs.io/en/stable/stubgen.html
but the instructions about creating a stub for a C Extension are a little mysterious. I tried to use it on the .so file without luck.
It says that stubgen works on .py files not .so files.
You will need to write the .pyi for your .so manually.
The docs could do with splitting the need for .pyi for .so
away from the stubgen description.
On 30 Jul 2022, at 10:30, Marco Sulla <Marco.Sulla.Python@gmail.com> wrote:
On Fri, 29 Jul 2022 at 23:23, Barry <barry@barrys-emacs.org> wrote:
On 29 Jul 2022, at 19:33, Marco Sulla <Marco.Sulla.Python@gmail.com> wrote:
I tried to follow the instructions here:
https://mypy.readthedocs.io/en/stable/stubgen.html
but the instructions about creating a stub for a C Extension are a little >>> mysterious. I tried to use it on the .so file without luck.
It says that stubgen works on .py files not .so files.
You will need to write the .pyi for your .so manually.
The docs could do with splitting the need for .pyi for .so
away from the stubgen description
But it says:
"Mypy includes the stubgen tool that can automatically generate stub
files (.pyi files) for Python modules and C extension modules."
I tried stubgen -m modulename, but it generates very little code.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 91:38:30 |
Calls: | 6,658 |
Files: | 12,203 |
Messages: | 5,334,171 |