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

Python Bindings and AutoComplete #3050

Open
TrevorCash opened this issue Oct 15, 2024 · 1 comment
Open

Python Bindings and AutoComplete #3050

TrevorCash opened this issue Oct 15, 2024 · 1 comment
Labels

Comments

@TrevorCash
Copy link

TrevorCash commented Oct 15, 2024

Hello All,

I am generating bindings for a python module and testing in a vscode enviroment. the returned types are custom c classes.

On the python side for example I have this where module is the imported module:

    samplingCommand = module.Command_Update()
    
    lastCommand = device.addCommand(samplingCommand)

there is autocomplete on the samplingCommand object because I am directly instantiating a cntr.Command_Update() object, The lastCommand object does not have autocomplete. I assume this is because it is a pointer returned (in c ) by the addCommand() function.

Is there a way of getting better parsing of pointer return types. is a typemap required for this?

Thanks for any Help,
-Trevor

@ojwb ojwb added the Python label Oct 20, 2024
@ojwb
Copy link
Member

ojwb commented Oct 22, 2024

I know nothing about vscode specifically, but I suspect you're wanting PEP 484 type hints. SWIG has rather limited support for these currently where it can only provide the C/C type. Maybe that's enough, but maybe you need the Python types which is still to be implemented - see #735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants