openego / eTraGo

Optimization of flexibility options for transmission grids based on PyPSA
GNU Affero General Public License v3.0
32 stars 13 forks source link

Replace bare except statements #669

Open ClaraBuettner opened 1 year ago

ClaraBuettner commented 1 year ago

flake8 tests for "Can not use bare except" are currently excluded. I tried to fix those problems, but since I didn't know the error that could show up for all occurrences, I was not able to fix all of them. It would be good if I could get some help from the others who created those statements.

These statements occur e.g. here:

https://github.com/openego/eTraGo/blob/e16bdd309fbfdc934f97153b2c21a581cfbb502b/etrago/cluster/electrical.py#L969-L973

You can easily find them when running flake8. When these problems are solved, we can turn on the flake8 changes for this in noxfile.py.