Skip to content

Commit db8947b

Browse files
committed
pycodestyle stuff
1 parent 61e97bc commit db8947b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/sage/combinat/bijectionist.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,6 +2456,7 @@ def solutions_iterator(self):
24562456
self._bmilp = _BijectionistMILP(self)
24572457
yield from self._bmilp.solutions_iterator(False, [])
24582458

2459+
24592460
class _BijectionistMILP():
24602461
r"""
24612462
Wrapper class for the MixedIntegerLinearProgram (MILP). This
@@ -2590,7 +2591,6 @@ def show(self, variables=True):
25902591
print(f" {v}: " + "".join([f"s({a}) = "
25912592
for a in P[p]]) + f"{z}")
25922593

2593-
25942594
def _prepare_solution(self, on_blocks, solution):
25952595
r"""
25962596
Return the solution as a dictionary from `A` (or `P`) to
@@ -2766,9 +2766,10 @@ def _is_solution(self, constraint, values):
27662766
variable_index = next(iter(v.dict().keys()))
27672767
index_block_value_dict[variable_index] = (p, z)
27682768

2769-
evaluate = lambda f: sum(coeff if index == -1 else
2770-
coeff * values[index_block_value_dict[index]]
2771-
for index, coeff in f.dict().items())
2769+
def evaluate(f):
2770+
return sum(coeff if index == -1 else
2771+
coeff * values[index_block_value_dict[index]]
2772+
for index, coeff in f.dict().items())
27722773

27732774
for lhs, rhs in constraint.equations():
27742775
if evaluate(lhs - rhs):
@@ -3052,6 +3053,7 @@ def sum_q(q):
30523053
for q in Q[1:]:
30533054
self.milp.add_constraint(len(q0)*sum_q(q) == len(q)*v0, name=f"h: ({q})~({q0})")
30543055

3056+
30553057
def _invert_dict(d):
30563058
"""
30573059
Return the dictionary whose keys are the values of the input and
@@ -3126,6 +3128,7 @@ def _non_copying_intersection(sets):
31263128
if s == result:
31273129
return s
31283130

3131+
31293132
"""
31303133
TESTS::
31313134

0 commit comments

Comments
 (0)