Skip to content

Commit 8eeba35

Browse files
Matthias Köppetornaria
authored andcommitted
src/sage/numerical: Incidental style fixes
1 parent 161d993 commit 8eeba35

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

src/sage/numerical/backends/cvxpy_backend.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ cdef class CVXPYBackend:
869869
"""
870870
return self.variables[index].name()
871871

872-
cpdef variable_upper_bound(self, int index, value = False):
872+
cpdef variable_upper_bound(self, int index, value=False):
873873
"""
874874
Return or define the upper bound on a variable
875875
@@ -901,7 +901,7 @@ cdef class CVXPYBackend:
901901
else:
902902
return self.col_upper_bound[index]
903903

904-
cpdef variable_lower_bound(self, int index, value = False):
904+
cpdef variable_lower_bound(self, int index, value=False):
905905
"""
906906
Return or define the lower bound on a variable
907907

src/sage/numerical/backends/generic_backend.pxd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ cdef class GenericBackend (SageObject):
3838
cpdef bint is_variable_binary(self, int) noexcept
3939
cpdef bint is_variable_integer(self, int) noexcept
4040
cpdef bint is_variable_continuous(self, int) noexcept
41-
cpdef problem_name(self, name = *)
41+
cpdef problem_name(self, name=*)
4242
cpdef row_bounds(self, int index)
4343
cpdef col_bounds(self, int index)
4444
cpdef row_name(self, int index)
4545
cpdef col_name(self, int index)
46-
cpdef variable_upper_bound(self, int index, value = *)
47-
cpdef variable_lower_bound(self, int index, value = *)
46+
cpdef variable_upper_bound(self, int index, value=*)
47+
cpdef variable_lower_bound(self, int index, value=*)
4848
cpdef solver_parameter(self, name, value=*)
4949
cpdef zero(self)
5050
cpdef base_ring(self)
@@ -57,4 +57,4 @@ cdef class GenericBackend (SageObject):
5757

5858
cdef object obj_constant_term
5959

60-
cpdef GenericBackend get_solver(constraint_generation = ?, solver = ?, base_ring = ?)
60+
cpdef GenericBackend get_solver(constraint_generation=?, solver=?, base_ring=?)

src/sage/numerical/backends/generic_backend.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ cdef class GenericBackend:
335335
else:
336336
self.obj_constant_term = d
337337

338-
cpdef set_objective(self, list coeff, d = 0.0):
338+
cpdef set_objective(self, list coeff, d=0.0):
339339
"""
340340
Set the objective function.
341341
@@ -1347,7 +1347,7 @@ cdef class GenericBackend:
13471347
p._test_copy(**options)
13481348
p._test_copy_does_not_share_data(**options)
13491349

1350-
cpdef variable_upper_bound(self, int index, value = False):
1350+
cpdef variable_upper_bound(self, int index, value=False):
13511351
"""
13521352
Return or define the upper bound on a variable
13531353
@@ -1374,7 +1374,7 @@ cdef class GenericBackend:
13741374
"""
13751375
raise NotImplementedError()
13761376

1377-
cpdef variable_lower_bound(self, int index, value = False):
1377+
cpdef variable_lower_bound(self, int index, value=False):
13781378
"""
13791379
Return or define the lower bound on a variable
13801380
@@ -1401,7 +1401,7 @@ cdef class GenericBackend:
14011401
"""
14021402
raise NotImplementedError()
14031403

1404-
cpdef solver_parameter(self, name, value = None):
1404+
cpdef solver_parameter(self, name, value=None):
14051405
"""
14061406
Return or define a solver parameter
14071407

src/sage/numerical/backends/generic_sdp_backend.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ cdef class GenericSDPBackend:
590590
"""
591591
raise NotImplementedError()
592592

593-
cpdef solver_parameter(self, name, value = None):
593+
cpdef solver_parameter(self, name, value=None):
594594
"""
595595
Return or define a solver parameter
596596

src/sage/numerical/backends/glpk_backend.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cdef class GLPKBackend(GenericBackend):
2727
cdef int simplex_or_intopt
2828
cdef search_tree_data_t search_tree_data
2929
cpdef __copy__(self)
30-
cpdef int print_ranges(self, filename = *) except -1
30+
cpdef int print_ranges(self, filename=*) except -1
3131
cpdef double get_row_dual(self, int variable) noexcept
3232
cpdef double get_col_dual(self, int variable) except? -1
3333
cpdef int get_row_stat(self, int variable) except? -1

src/sage/numerical/backends/glpk_backend.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ cdef class GLPKBackend(GenericBackend):
379379
raise ValueError("Problem name for GLPK must not be longer than 255 characters.")
380380
glp_set_prob_name(self.lp, name)
381381

382-
cpdef set_objective(self, list coeff, d = 0.0):
382+
cpdef set_objective(self, list coeff, d=0.0):
383383
"""
384384
Set the objective function.
385385

src/sage/numerical/backends/glpk_graph_backend.pxd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ ctypedef struct c_a_data:
2727

2828
cdef class GLPKGraphBackend():
2929
cdef glp_graph * graph
30-
cpdef add_vertex(self, name = ?)
30+
cpdef add_vertex(self, name=?)
3131
cpdef list add_vertices(self, vertices)
3232
cpdef __add_vertices_sage(self, g)
3333
cpdef dict get_vertex(self, vertex)
3434
cpdef dict get_vertices(self, verts)
3535
cpdef set_vertex_demand(self, vertex, param)
3636
cpdef set_vertices_demand(self, list pairs)
3737
cpdef list vertices(self)
38-
cpdef add_edge(self, u, v, dict params = ?)
38+
cpdef add_edge(self, u, v, dict params=?)
3939
cpdef __add_edges_sage(self, g)
4040
cpdef list add_edges(self, edges)
41-
cpdef delete_edge(self, u, v, dict params = ?)
41+
cpdef delete_edge(self, u, v, dict params=?)
4242
cpdef tuple get_edge(self, u, v)
4343
cpdef list edges(self)
4444
cpdef delete_vertex(self, vert)

src/sage/numerical/backends/interactivelp_backend.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ cdef class InteractiveLPBackend:
396396
constraint_types, variable_types,
397397
problem_type, ring, objective_constant_term=d)
398398

399-
cpdef set_objective(self, list coeff, d = 0):
399+
cpdef set_objective(self, list coeff, d=0):
400400
"""
401401
Set the objective function.
402402
@@ -977,7 +977,7 @@ cdef class InteractiveLPBackend:
977977
"""
978978
return str(self.lp.decision_variables()[index])
979979

980-
cpdef variable_upper_bound(self, int index, value = False):
980+
cpdef variable_upper_bound(self, int index, value=False):
981981
"""
982982
Return or define the upper bound on a variable
983983
@@ -1021,7 +1021,7 @@ cdef class InteractiveLPBackend:
10211021
constraint_types, variable_types,
10221022
problem_type, ring, objective_constant_term=d)
10231023

1024-
cpdef variable_lower_bound(self, int index, value = False):
1024+
cpdef variable_lower_bound(self, int index, value=False):
10251025
"""
10261026
Return or define the lower bound on a variable
10271027

src/sage/numerical/backends/ppl_backend.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ cdef class PPLBackend(GenericBackend):
10631063
return self.col_name_var[index]
10641064
return "x_" + repr(index)
10651065

1066-
cpdef variable_upper_bound(self, int index, value = False):
1066+
cpdef variable_upper_bound(self, int index, value=False):
10671067
"""
10681068
Return or define the upper bound on a variable
10691069
@@ -1095,7 +1095,7 @@ cdef class PPLBackend(GenericBackend):
10951095
else:
10961096
return self.col_upper_bound[index]
10971097

1098-
cpdef variable_lower_bound(self, int index, value = False):
1098+
cpdef variable_lower_bound(self, int index, value=False):
10991099
"""
11001100
Return or define the lower bound on a variable
11011101

0 commit comments

Comments
 (0)