@@ -325,7 +325,9 @@ def test_highs_rejects_quadratic_constraints(
325325 from linopy .solvers import quadratic_constraint_solvers
326326
327327 if "highs" not in quadratic_constraint_solvers :
328- with pytest .raises (ValueError , match = "does not support quadratic constraints" ):
328+ with pytest .raises (
329+ ValueError , match = "does not support quadratic constraints"
330+ ):
329331 m .solve (solver_name = "highs" )
330332
331333 def test_highs_accepts_quadratic_objective (
@@ -434,9 +436,7 @@ def test_empty_container_repr(self) -> None:
434436class TestMatrixAccessor :
435437 """Tests for matrix accessor with quadratic constraints."""
436438
437- def test_qclabels (
438- self , m : Model , x : linopy .Variable , y : linopy .Variable
439- ) -> None :
439+ def test_qclabels (self , m : Model , x : linopy .Variable , y : linopy .Variable ) -> None :
440440 """Test qclabels property."""
441441 m .add_objective (x + y )
442442 m .add_quadratic_constraints (x * x , "<=" , 25 , name = "qc1" )
@@ -447,9 +447,7 @@ def test_qclabels(
447447 assert labels [0 ] == 0
448448 assert labels [1 ] == 1
449449
450- def test_qc_sense (
451- self , m : Model , x : linopy .Variable , y : linopy .Variable
452- ) -> None :
450+ def test_qc_sense (self , m : Model , x : linopy .Variable , y : linopy .Variable ) -> None :
453451 """Test qc_sense property."""
454452 m .add_objective (x + y )
455453 m .add_quadratic_constraints (x * x , "<=" , 25 , name = "qc1" )
@@ -460,9 +458,7 @@ def test_qc_sense(
460458 assert senses [0 ] == "<="
461459 assert senses [1 ] == ">="
462460
463- def test_qc_rhs (
464- self , m : Model , x : linopy .Variable , y : linopy .Variable
465- ) -> None :
461+ def test_qc_rhs (self , m : Model , x : linopy .Variable , y : linopy .Variable ) -> None :
466462 """Test qc_rhs property."""
467463 m .add_objective (x + y )
468464 m .add_quadratic_constraints (x * x , "<=" , 25 , name = "qc1" )
@@ -504,9 +500,7 @@ def test_Qc_cross_terms(
504500 assert Q [0 , 0 ] == 0.0 # No x^2 term
505501 assert Q [1 , 1 ] == 0.0 # No y^2 term
506502
507- def test_qc_linear (
508- self , m : Model , x : linopy .Variable , y : linopy .Variable
509- ) -> None :
503+ def test_qc_linear (self , m : Model , x : linopy .Variable , y : linopy .Variable ) -> None :
510504 """Test qc_linear property."""
511505 m .add_objective (x + y )
512506 m .add_quadratic_constraints (x * x + 3 * x + 4 * y , "<=" , 25 , name = "mixed" )
0 commit comments