PyPSA / linopy

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

io: open file using context manager to properly close it again #381

Closed tburandt closed 1 day ago

tburandt commented 1 day ago

instead of a blind open(), solvers.py now uses a context manager to close the file handle properly after reading the file contents