Skip to content

Commit 78a16ba

Browse files
committed
suggested changes
1 parent ac9251c commit 78a16ba

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/sage/games/hexad.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def view_list(L):
107107
return matrix(GF(2), 3, 3, lambda x, y: 1 if (x, y) in L else 0)
108108

109109

110-
def picture_set(A, L):
110+
def picture_set(A, L) -> set:
111111
"""
112112
This is needed in the :meth:`Minimog.find_hexad` function below.
113113
@@ -219,7 +219,7 @@ def __init__(self, type="shuffle"):
219219
tets[9] = MS34_GF3([[0, 0, 0, 1], [0, 0, 1, 0], [1, 1, 0, 0]])
220220
self.tet = tets
221221

222-
def __repr__(self):
222+
def __repr__(self) -> str:
223223
"""
224224
Return a string representation of ``self``.
225225
@@ -231,7 +231,7 @@ def __repr__(self):
231231
"""
232232
return "Minimog of type %s" % self.type
233233

234-
def __str__(self):
234+
def __str__(self) -> str:
235235
"""
236236
EXAMPLES::
237237
@@ -555,31 +555,31 @@ def find_hexad(self, pts):
555555
MINIMOG[0][2], MINIMOG[2][1])
556556
if H: # must be type 3
557557
return list(H), WHAT
558-
if H == []: # could be type 0
559-
H, WHAT = self.find_hexad0(LL - L2)
560-
if H: # must be type 0
561-
return list(H), WHAT
558+
# could be type 0
559+
H, WHAT = self.find_hexad0(LL - L2)
560+
if H: # must be type 0
561+
return list(H), WHAT
562562
if (MINIMOG[2][1] in LL and MINIMOG[0][0] in LL):
563563
H, WHAT = self.find_hexad3(LL - {MINIMOG[2][1], MINIMOG[0][0]},
564564
MINIMOG[2][1], MINIMOG[0][0])
565565
if H: # must be type 3
566566
return list(H), WHAT
567-
if H == []: # could be type 0
568-
H, WHAT = self.find_hexad0(LL - L2)
569-
if H: # must be type 0
570-
return list(H), WHAT
567+
# could be type 0
568+
H, WHAT = self.find_hexad0(LL - L2)
569+
if H: # must be type 0
570+
return list(H), WHAT
571571
if (MINIMOG[0][2] in LL and MINIMOG[0][0] in LL):
572572
H, WHAT = self.find_hexad3(LL - {MINIMOG[0][2], MINIMOG[0][0]},
573573
MINIMOG[0][2], MINIMOG[0][0])
574574
if H: # must be type 3
575575
return list(H), WHAT
576-
if H == []: # could be type 0
577-
H, WHAT = self.find_hexad0(LL - L2)
578-
if H: # must be type 0
579-
return list(H), WHAT
576+
# could be type 0
577+
H, WHAT = self.find_hexad0(LL - L2)
578+
if H: # must be type 0
579+
return list(H), WHAT
580580
if len(L2) == 1:
581581
H, WHAT = self.find_hexad2(LL - L2, list(L2)[0])
582-
if H == []: # not a cross in picture at infinity
582+
if not H: # not a cross in picture at infinity
583583
if list(L2)[0] == MINIMOG[2][1]:
584584
L1 = LL - L2
585585
H, WHAT = self.find_hexad3(L1, MINIMOG[0][0], MINIMOG[2][1])

0 commit comments

Comments
 (0)