Amplpy have type hint suport? (Types Stub)
Hi, I am a beginner with AMPL and I decided to learn amplpy because I have more experience with Python.
I installed the amplpy library following the official guide (https://amplpy.ampl.com/en/latest/getting-started.html) with the "highs" solver and implemented a simple example:
It is working, but I noticed that VS Code (Pylance) is not recognizing the amplpy types correctly. I suppose this is because the "ampl" submodule in "amplpy" is built in C++/Cython. Am I missing something? I am using Python 3.12.
I am not sure if I am doing something wrong, but if not, does amplpy provide an official type stub library for type hints? Or is there another way to get type information from the documentation, etc.?
I know this is not really an issue, but thanks in advance!
This issue is stale because it has been open for 30 days with no activity.
Thank you for bringing it up! I am working on adding typehints to amplpy.
This issue is stale because it has been open for 30 days with no activity.
@davi-lucciola We’ve just released amplpy 0.16.0, which adds full type hints. We would appreciate your feedback and any suggestions you may have.
Thank you @jurgen-lentz! I will take a look
I will close this issue now. If you have any feedback or encounter any problems with the type hints, please open a new issue @davi-lucciola .