Skip to content

Commit 8e06f72

Browse files
committed
fix ruff errors
1 parent 7778c6d commit 8e06f72

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

linopy/solvers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def set_int_index(series: Series) -> Series:
137137
"""
138138
try:
139139
series.index = series.index.str[1:].astype(int)
140-
except:
140+
except ValueError as _:
141141
series.index = series.index.str.replace(".*#", "", regex=True).astype(int)
142142
return series
143143

test/test_optimization.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@
2929
# mps io is only supported via highspy
3030
io_apis.append("mps")
3131

32-
params = [
33-
(name, io_api, with_names)
34-
for (name, io_api, with_names) in list(
35-
itertools.product(available_solvers, io_apis, with_names)
36-
)
37-
if "lp" in io_api or with_names == False
38-
]
32+
params = list(itertools.product(available_solvers, io_apis, with_names))
3933

4034
direct_solvers = ["gurobi", "highs", "mosek"]
4135
for solver in direct_solvers:

0 commit comments

Comments
 (0)