Starting with Gurobi 9.5, type hinting is available for most classes and functions in the gurobipy package. The type hinting package, gurobipy-stubs, is distributed as a separate Python package on PyPI.org. In the future, these type hints may be integrated into gurobipy, in which case a separate package installation would no longer be necessary.
The following command installs the gurobipy-stubs package into your Python environment:
python -m pip install gurobipy-stubs
Once gurobipy-stubs is installed into a Python environment, IDEs like Visual Studio Code and PyCharm configured to use that environment will begin to display autocomplete suggestions and catch certain type-related errors for gurobipy code.
The source code for the gurobipy-stubs package is available on GitHub.com. We encourage users to open an issue to report any problems they encounter while using the package.
Comments
0 comments
Article is closed for comments.