Open RobertoRoos opened 1 week ago
I'm a little surprised code suggestions are also not working form a console, because __dir__
looks to be implemented correctly:
One option could be create a .pyi
file in the module, alongside the .pyx
file. This will describe the interface to any IDE:
# file: pysoem/pysoem.pyi
class Master: ...
def find_adapters(): ...
But this would require every single object to be repeated, which isn't very DRY.
The .pyi
file would be leading for documentation too, so all docs info should be moved from the source file into the interface file.
I've teste MyPy's stubgen
, but it doesn't detect the contents of the pysoem
package directly.
I couldn't find a reference to this yet: it seems code completion / intellisense / etc. isn't working at all for
pysoem
:This is in PyCharm, but the same happens in VS Code.
I imagine this is a consequence of Cython? Maybe we could add some
.pyi
files for code analysis. Ideally generated from the Cython source files.