From 6a2178a617ebc3d4cc87e0b5c791973e0175ba4e Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 18 Dec 2024 20:49:33 -0500 Subject: [PATCH] lint --- src/ilpy/_constants.py | 1 + src/ilpy/_functional.py | 1 + src/ilpy/solver_backends/_gurobi.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ilpy/_constants.py b/src/ilpy/_constants.py index 398bf53..4f691f5 100644 --- a/src/ilpy/_constants.py +++ b/src/ilpy/_constants.py @@ -34,6 +34,7 @@ class SolverStatus(Enum): SUBOPTIMAL = "suboptimal" OTHER = "other" + # Gurobi Status PySCIPOpt Status Meaning # GRB.LOADED SCIP_STATUS_UNKNOWN Model loaded but not optimized yet. # GRB.OPTIMAL SCIP_STATUS_OPTIMAL Optimal solution found. diff --git a/src/ilpy/_functional.py b/src/ilpy/_functional.py index 2f444b1..51a8c36 100644 --- a/src/ilpy/_functional.py +++ b/src/ilpy/_functional.py @@ -74,6 +74,7 @@ def solve( if TYPE_CHECKING: from ilpy import EventData + def callback(data: EventData) -> None: # backend and event_type are guaranteed to be present # they will narrow down the available keys diff --git a/src/ilpy/solver_backends/_gurobi.py b/src/ilpy/solver_backends/_gurobi.py index a6d89d4..7f8b914 100644 --- a/src/ilpy/solver_backends/_gurobi.py +++ b/src/ilpy/solver_backends/_gurobi.py @@ -47,7 +47,7 @@ class GurobiSolver(SolverBackend): - def __init__(self): + def __init__(self) -> None: # we put this in __init__ instead of initialize so that it will raise an # exception inside of create_backend if the module is imported but the # license is not available