Skip to content

Commit

Permalink
Format python files
Browse files Browse the repository at this point in the history
New version of black gets a bit more opinionated about empty lines
  • Loading branch information
simonbowly committed Jun 5, 2023
1 parent 9419abd commit ed01e92
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def process_docstring(app, what, name, obj, options, lines):
"""Add parameter entries for decorated mods"""

if what in ["function", "method"] and hasattr(obj, "_decorated_mod"):

# Find where the last input parameter is listed
in_paramlist = False
lineno = None
Expand Down
1 change: 0 additions & 1 deletion src/gurobi_optimods/bipartite_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def _maximum_bipartite_matching_pandas(frame, n1_column, n2_column, create_env):
already in a pandas dataframe."""

with create_env() as env, gp.Model(env=env) as model:

# Directed flow variables between bipartite sets
df = frame.set_index([n1_column, n2_column]).gppd.add_vars(
model, ub=1, name="flow"
Expand Down
2 changes: 0 additions & 2 deletions src/gurobi_optimods/qubo.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class QuboResult:


def callback(model, where):

if where == GRB.Callback.MIP:
runtime = model.cbGet(GRB.Callback.RUNTIME)
if runtime >= model._next_output_time:
Expand Down Expand Up @@ -85,7 +84,6 @@ def solve_qubo(coeff_matrix, time_limit=GRB.INFINITY, *, create_env) -> QuboResu
params = {"TimeLimit": time_limit, "LogToConsole": 0}

with create_env(params=params) as env, gp.Model(env=env) as model:

x = model.addMVar(n, vtype=GRB.BINARY)
model.setObjective(x @ coeff_matrix @ x, GRB.MINIMIZE)

Expand Down
1 change: 0 additions & 1 deletion src/gurobi_optimods/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def fit(self, X_train, y_train, *, create_env):

# Create model
with create_env() as env, gp.Model(env=env) as model:

# Create unbounded variables for each column coefficient, and bound
# magnitudes using additional variables. Keep intercept separate.
intercept = model.addVar(lb=-GRB.INFINITY, name="intercept")
Expand Down
1 change: 0 additions & 1 deletion src/gurobi_optimods/workforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def solve_workforce_scheduling(
input data
"""
with create_env() as env, gp.Model(env=env) as m:

# Create binary variables for all valid shift assignments and
# create preference maximization objective
m.ModelSense = GRB.MAXIMIZE
Expand Down
2 changes: 0 additions & 2 deletions tests/test_workforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def test_constrained(self):
)

with self.subTest("upperlimits"):

worker_limits = read_csv(
"""
Worker,MinShifts,MaxShifts
Expand Down Expand Up @@ -228,7 +227,6 @@ def test_constrained(self):
)

with self.subTest("lowerlimits"):

worker_limits = read_csv(
"""
Worker,MinShifts,MaxShifts
Expand Down

0 comments on commit ed01e92

Please sign in to comment.