type hinting mistake in gurobipy 11
Answeredmodel.copy() does return a model, but in the gurobipy/Model.py copy function return None.
0
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Jiahua,
Thank you for contacting us about this. Are you able to provide some more information about where you see the incorrect type hint? The type hints seem to show ok for me in VS Code, and checking with mypy seems to indicate the return type of copy is gurobipy.Model.
- Riley
0 -
Sorry, my mistake, you are right. The problem happened when using PyCharm and I noticed it jump to the definition in "/home/xxxx/.cache/JetBrains/PyCharmCE2023.3/python_stubs/274796526/gurobipy/gurobipy/Model.py", I believe it's PyCharm's problem.
0
Post is closed for comments.
Comments
3 comments