type hinting mistake in gurobipy 11
Answeredmodel.copy() does return a model, but in the gurobipy/Model.py copy function return None.
0
-
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
Please sign in to leave a comment.
Comments
2 comments