Add types to remaining files; activate mypy's disallow_untyped_defs

This commit is contained in:
2021-04-07 21:25:30 -05:00
parent f5606efb72
commit e9cd6d1715
21 changed files with 102 additions and 64 deletions

View File

@@ -3,7 +3,7 @@
# Released under the modified BSD license. See COPYING.md for more details.
import logging
from typing import Any, FrozenSet, Hashable
from typing import Any, FrozenSet, Hashable, List
import gurobipy as gp
import networkx as nx
@@ -39,7 +39,7 @@ class GurobiStableSetProblem(Instance):
return True
@overrides
def find_violated_user_cuts(self, model):
def find_violated_user_cuts(self, model: Any) -> List[FrozenSet]:
assert isinstance(model, gp.Model)
vals = model.cbGetNodeRel(model.getVars())
violations = []