dimod icon indicating copy to clipboard operation
dimod copied to clipboard

Mypy stub files for Cython files

Open arcondello opened this issue 3 years ago • 1 comments

It would be good to add stub files for some of the most commonly used cython packages because cython current does not support type annotations.

Especially dimod.cyvariables and dimod.cyutilities would benefit because the Variables object is used in many places.

Should be as simple as adding a dimod/cyvariables.pyi file etc.

arcondello avatar Jul 11 '22 16:07 arcondello

As a downside, it does not seem like those type annotations are picked up by sphinx (see https://github.com/sphinx-doc/sphinx/issues/7630).

arcondello avatar Jul 12 '22 16:07 arcondello