@@ -107,7 +107,7 @@ def view_list(L):
107
107
return matrix (GF (2 ), 3 , 3 , lambda x , y : 1 if (x , y ) in L else 0 )
108
108
109
109
110
- def picture_set (A , L ):
110
+ def picture_set (A , L ) -> set :
111
111
"""
112
112
This is needed in the :meth:`Minimog.find_hexad` function below.
113
113
@@ -219,7 +219,7 @@ def __init__(self, type="shuffle"):
219
219
tets [9 ] = MS34_GF3 ([[0 , 0 , 0 , 1 ], [0 , 0 , 1 , 0 ], [1 , 1 , 0 , 0 ]])
220
220
self .tet = tets
221
221
222
- def __repr__ (self ):
222
+ def __repr__ (self ) -> str :
223
223
"""
224
224
Return a string representation of ``self``.
225
225
@@ -231,7 +231,7 @@ def __repr__(self):
231
231
"""
232
232
return "Minimog of type %s" % self .type
233
233
234
- def __str__ (self ):
234
+ def __str__ (self ) -> str :
235
235
"""
236
236
EXAMPLES::
237
237
@@ -555,31 +555,31 @@ def find_hexad(self, pts):
555
555
MINIMOG [0 ][2 ], MINIMOG [2 ][1 ])
556
556
if H : # must be type 3
557
557
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
562
562
if (MINIMOG [2 ][1 ] in LL and MINIMOG [0 ][0 ] in LL ):
563
563
H , WHAT = self .find_hexad3 (LL - {MINIMOG [2 ][1 ], MINIMOG [0 ][0 ]},
564
564
MINIMOG [2 ][1 ], MINIMOG [0 ][0 ])
565
565
if H : # must be type 3
566
566
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
571
571
if (MINIMOG [0 ][2 ] in LL and MINIMOG [0 ][0 ] in LL ):
572
572
H , WHAT = self .find_hexad3 (LL - {MINIMOG [0 ][2 ], MINIMOG [0 ][0 ]},
573
573
MINIMOG [0 ][2 ], MINIMOG [0 ][0 ])
574
574
if H : # must be type 3
575
575
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
580
580
if len (L2 ) == 1 :
581
581
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
583
583
if list (L2 )[0 ] == MINIMOG [2 ][1 ]:
584
584
L1 = LL - L2
585
585
H , WHAT = self .find_hexad3 (L1 , MINIMOG [0 ][0 ], MINIMOG [2 ][1 ])
0 commit comments