Skip to content

Commit 79e965c

Browse files
hugovkniklasf
authored andcommitted
Remove redundant parentheses
1 parent 0b1c4f9 commit 79e965c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

chess/gaviota.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def norm_kkindex(x, y):
376376
rowx = chess.square_rank(x)
377377
colx = chess.square_file(x)
378378

379-
if (rowx > colx):
379+
if rowx > colx:
380380
x = flip_nw_se(x)
381381
y = flip_nw_se(y)
382382

@@ -745,15 +745,15 @@ def kaabk_pctoindex(c):
745745
ws = c.white_piece_squares[:N_WHITE]
746746
bs = c.black_piece_squares[:N_BLACK]
747747

748-
if ((ft & WE_FLAG) != 0):
748+
if (ft & WE_FLAG) != 0:
749749
ws = [flip_we(i) for i in ws]
750750
bs = [flip_we(i) for i in bs]
751751

752-
if ((ft & NS_FLAG) != 0):
752+
if (ft & NS_FLAG) != 0:
753753
ws = [flip_ns(i) for i in ws]
754754
bs = [flip_ns(i) for i in bs]
755755

756-
if ((ft & NW_SE_FLAG) != 0):
756+
if (ft & NW_SE_FLAG) != 0:
757757
ws = [flip_nw_se(i) for i in ws]
758758
bs = [flip_nw_se(i) for i in bs]
759759

@@ -1400,14 +1400,14 @@ def bestx(side, a, b):
14001400

14011401
xorkey = [0, 3]
14021402

1403-
if (a == iFORBID):
1403+
if a == iFORBID:
14041404
return b
1405-
if (b == iFORBID):
1405+
if b == iFORBID:
14061406
return a
14071407

14081408
retu = [a, a, b, b]
14091409

1410-
if (b < a):
1410+
if b < a:
14111411
retu[1] = b
14121412
retu[2] = a
14131413

0 commit comments

Comments
 (0)