Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code completion / Intellisense not working for #145

Open
RobertoRoos opened this issue Jul 1, 2024 · 2 comments
Open

Code completion / Intellisense not working for #145

RobertoRoos opened this issue Jul 1, 2024 · 2 comments

Comments

@RobertoRoos
Copy link
Contributor

RobertoRoos commented Jul 1, 2024

I couldn't find a reference to this yet: it seems code completion / intellisense / etc. isn't working at all for pysoem:
image

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.

@RobertoRoos
Copy link
Contributor Author

I'm a little surprised code suggestions are also not working form a console, because __dir__ looks to be implemented correctly:
image

@RobertoRoos
Copy link
Contributor Author

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.

@RobertoRoos RobertoRoos changed the title Code completion / Intelisense not working for Code completion / Intellisense not working for Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant