PyPSA / linopy

Linear optimization with N-D labeled arrays in Python
https://linopy.readthedocs.io
MIT License
162 stars 45 forks source link

Docstring of `Model.solve()` has wrong return type #260

Closed leuchtum closed 5 months ago

leuchtum commented 6 months ago

Docstring of Model.solve defines return type as Model:

https://github.com/PyPSA/linopy/blob/ecbc96266e3195b756fa528ff2faa4afe9243743/linopy/model.py#L996-L999

But a tuple of status and termination condition is returned in line 1085 and line 1111:

https://github.com/PyPSA/linopy/blob/ecbc96266e3195b756fa528ff2faa4afe9243743/linopy/model.py#L1085 https://github.com/PyPSA/linopy/blob/ecbc96266e3195b756fa528ff2faa4afe9243743/linopy/model.py#L1111