Skip to content

Commit 025b4ab

Browse files
committed
fix suggestions
1 parent bc61261 commit 025b4ab

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

src/sage/coding/linear_rank_metric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,9 @@ def decoding_radius(self):
891891
sage: D.decoding_radius()
892892
1
893893
"""
894-
return (self.code().minimum_distance()-1) // 2
894+
return (self.code().minimum_distance() - 1) // 2
895895

896-
####################### registration ###############################
897896

897+
####################### registration ###############################
898898

899899
LinearRankMetricCode._registered_encoders["GeneratorMatrix"] = LinearCodeGeneratorMatrixEncoder

src/sage/coding/parity_check_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def message_space(self):
349349
"""
350350
return VectorSpace(self.code().base_field(), self.code().dimension())
351351

352-
####################### registration ###############################
353352

353+
####################### registration ###############################
354354

355355
ParityCheckCode._registered_encoders["ParityCheckCodeGeneratorMatrixEncoder"] = ParityCheckCodeGeneratorMatrixEncoder
356356
ParityCheckCode._registered_encoders["ParityCheckCodeStraightforwardEncoder"] = ParityCheckCodeStraightforwardEncoder

src/sage/coding/punctured_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,8 @@ def decoding_radius(self, number_erasures=None):
709709
elif "error-erasure" in D.decoder_type() and number_erasures is None:
710710
raise ValueError("You must provide the number of erasures")
711711

712-
####################### registration ###############################
713712

713+
####################### registration ###############################
714714

715715
PuncturedCode._registered_encoders["PuncturedMatrix"] = PuncturedCodePuncturedMatrixEncoder
716716
PuncturedCode._registered_decoders["OriginalCode"] = PuncturedCodeOriginalCodeDecoder

src/sage/coding/subfield_subcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ def decoding_radius(self, **kwargs):
419419
"""
420420
return self.original_decoder().decoding_radius(**kwargs)
421421

422-
####################### registration ###############################
423422

423+
####################### registration ###############################
424424

425425
SubfieldSubcode._registered_decoders["OriginalCode"] = SubfieldSubcodeOriginalCodeDecoder
426426
SubfieldSubcodeOriginalCodeDecoder._decoder_type = {"dynamic"}

src/sage/crypto/sboxes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,10 @@ def monomial_function(n, e):
397397
X = R.gen()
398398
return SBox(X**e)
399399

400+
400401
# Bijective S-Boxes mapping 9 bits to 9
401402
# =====================================
402403

403-
404404
DryGASCON256 = SBox([
405405
0x10, 0x93, 0x11f, 0x9d, 0x1f, 0x9c, 0x113, 0x91, 0x2a, 0xa9, 0x127, 0xa5, 0x27, 0xa4, 0x129, 0xab,
406406
0x2c, 0xaf, 0x123, 0xa1, 0x23, 0xa0, 0x12f, 0xad, 0x1a, 0x99, 0x117, 0x95, 0x17, 0x94, 0x119, 0x9b,

src/sage/functions/gamma.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def _evalf_(self, x, y, parent=None, algorithm='pari'):
488488
return C(v)
489489

490490

491-
# synonym.
491+
# shorter alias
492492
gamma_inc = Function_gamma_inc()
493493

494494

@@ -652,7 +652,7 @@ def _mathematica_init_evaled_(self, *args):
652652
return "Gamma[%s,0,%s]" % (x, z)
653653

654654

655-
# synonym.
655+
# shorter alias
656656
gamma_inc_lower = Function_gamma_inc_lower()
657657

658658

src/sage/interfaces/gap.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,11 @@
222222
# suppress unaligned access to 0x..., ip=0x... warnings
223223
gap_cmd = 'prctl --unaligned=silent ' + gap_cmd
224224

225+
225226
def gap_command(use_workspace_cache=True, local=True):
226227
if use_workspace_cache:
227228
if local:
228-
return "%s -L %s"%(gap_cmd, WORKSPACE), False
229+
return "%s -L %s" % (gap_cmd, WORKSPACE), False
229230
else:
230231
# TO DO: Use remote workspace
231232
return gap_cmd, False
@@ -1037,7 +1038,6 @@ def _matrix_(self, R):
10371038
entries = [[R(self[r,c]) for c in range(1,m+1)] for r in range(1,n+1)]
10381039
return M(entries)
10391040

1040-
############
10411041

10421042
class Gap(Gap_generic):
10431043
r"""
@@ -1465,8 +1465,6 @@ def _tab_completion(self):
14651465
return [n for n in names if n[0] in string.ascii_letters]
14661466

14671467

1468-
############
1469-
14701468
def gap_reset_workspace(max_workspace_size=None, verbose=False):
14711469
r"""
14721470
Call this to completely reset the GAP workspace, which is used by
@@ -1765,11 +1763,10 @@ def intmod_gap_to_sage(x):
17651763
return Mod(Integer(m.group(1)), Integer(m.group(2)))
17661764
raise ValueError("Unable to convert Gap element '%s'" % s)
17671765

1768-
#############
1769-
17701766

17711767
gap = Gap()
17721768

1769+
17731770
def reduce_load_GAP():
17741771
"""
17751772
Returns the GAP interface object defined in sage.interfaces.gap.

src/sage/interfaces/magma.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,8 +2751,6 @@ def ideal(self, gens):
27512751
"""
27522752
return self.parent().bar_call(self, 'ideal', gens, nvals=1)
27532753

2754-
###########################################################################
2755-
27562754

27572755
magma = Magma()
27582756

src/sage/interfaces/singular.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -847,9 +847,9 @@ def cputime(self, t=None):
847847
else:
848848
return float(self.eval('timer'))/1000.0
849849

850-
###################################################################
850+
###########################################################
851851
# Singular libraries
852-
###################################################################
852+
###########################################################
853853
def lib(self, lib, reload=False):
854854
"""
855855
Load the Singular library named lib.
@@ -873,9 +873,9 @@ def lib(self, lib, reload=False):
873873
LIB = lib
874874
load = lib
875875

876-
###################################################################
876+
##########################################################
877877
# constructors
878-
###################################################################
878+
##########################################################
879879
def ideal(self, *gens):
880880
"""
881881
Return the ideal generated by gens.
@@ -2418,11 +2418,10 @@ def get_docstring(name):
24182418
except KeyError:
24192419
return ""
24202420

2421-
##################################
2422-
24232421

24242422
singular = Singular()
24252423

2424+
24262425
def reduce_load_Singular():
24272426
"""
24282427
EXAMPLES::

src/sage/manifolds/manifold.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2720,9 +2720,9 @@ def set_simplify_function(self, simplifying_func, method=None):
27202720
chart.calculus_method().set_simplify_function(simplifying_func,
27212721
method=method)
27222722

2723-
##############################################################################
2724-
## Constructor function
27252723

2724+
###########################################################
2725+
# Constructor function
27262726

27272727
_manifold_id = Integer(0)
27282728

0 commit comments

Comments
 (0)