Autocompletion in VScode editor for CoolProp

27 views
Skip to first unread message

Amir Aslanov

unread,
Nov 20, 2025, 2:06:36 PM (14 days ago) Nov 20
to coolprop-users
Hello everyone, I have issues with autocompletion for CoolProp in Python

VScode refuses to provide suggestions in editor area, is it suppose to be like that? Completion works prefectly fine in jupyter interactive window

Does it have something to do with CoolProp being originally written in C++? I stumbled upon this issue on GitHub with similar problem in question

As I understood with little additional research on stub files in python — for autocompletion to work I must write/generate stub file with type annotations for CoolProp and use it for type checking. Is this the best approach? Are there better options?

Issue is demonstrated in the attached screenshots along with version information for python, CoolProp and VScode

Completion works for other packages :
autocompletion for another package.png

No suggestions for CoolProp : no suggestions for CoolProp.png

Autocompletion works for jupyter interactive window :
autocompletion in jupyter interactive window.png

Version information : 
Software version.png
VScode version.png

Thanks for help

Ian Bell

unread,
Nov 21, 2025, 6:32:07 PM (13 days ago) Nov 21
to coolpro...@googlegroups.com
Yes, because they operate fundamentally differently. VS Code does not import and do introspection on imported things, rather they rely only on the presence of stubs. Jupyter under the hood does the import and figures out what is possible. Getting stubs to be generated properly is not a small endeavor and I think especially not straightforward for cython (upon which the Python interface of CoolProp is based).

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/coolprop-users/c0cc6076-a897-4c89-93d0-c73d7c0a5261n%40googlegroups.com.

Amir Aslanov

unread,
Nov 24, 2025, 9:30:35 AM (10 days ago) Nov 24
to coolprop-users
Got it, thanks for reply, I think I'll try to fiddle with it for a while and share my findings if anything meaningful emerges out of it

суббота, 22 ноября 2025 г. в 02:32:07 UTC+3, ian.h...@gmail.com:
Reply all
Reply to author
Forward
0 new messages