I was using pylint to check your codes quality and here are the results.
************* Module board
board.py:7:37: C0326: No space allowed before :
self.symbol2value = lambda x : 1 if x == "X" else (-1 if x == "O" else 0)
^ (bad-whitespace)
board.py:11:21: C0326: Exactly one space required after comma
def setBoard(self,inputs):
^ (bad-whitespace)
board.py:18:18: C0326: Exactly one space required after comma
def print(self,show_turn=False):
^ (bad-whitespace)
board.py:19:0: C0301: Line too long (107/100) (line-too-long)
board.py:19:29: C0326: Exactly one space required after comma
print(" " + str(['1','2','3']).replace("["," ").replace("]"," ").replace("'","").replace(","," "))
^ (bad-whitespace)
board.py:19:33: C0326: Exactly one space required after comma
print(" " + str(['1','2','3']).replace("["," ").replace("]"," ").replace("'","").replace(","," "))
^ (bad-whitespace)
board.py:19:51: C0326: Exactly one space required after comma
print(" " + str(['1','2','3']).replace("["," ").replace("]"," ").replace("'","").replace(","," "))
^ (bad-whitespace)
board.py:19:68: C0326: Exactly one space required after comma
print(" " + str(['1','2','3']).replace("["," ").replace("]"," ").replace("'","").replace(","," "))
^ (bad-whitespace)
board.py:19:85: C0326: Exactly one space required after comma
print(" " + str(['1','2','3']).replace("["," ").replace("]"," ").replace("'","").replace(","," "))
^ (bad-whitespace)
board.py:19:101: C0326: Exactly one space required after comma
print(" " + str(['1','2','3']).replace("["," ").replace("]"," ").replace("'","").replace(","," "))
^ (bad-whitespace)
board.py:20:15: C0326: Exactly one space required after comma
print(1,str([self.board[0],self.board[1],self.board[2]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:20:34: C0326: Exactly one space required after comma
print(1,str([self.board[0],self.board[1],self.board[2]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:20:48: C0326: Exactly one space required after comma
print(1,str([self.board[0],self.board[1],self.board[2]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:20:76: C0326: Exactly one space required after comma
print(1,str([self.board[0],self.board[1],self.board[2]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:20:92: C0326: Exactly one space required after comma
print(1,str([self.board[0],self.board[1],self.board[2]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:21:15: C0326: Exactly one space required after comma
print(2,str([self.board[3],self.board[4],self.board[5]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:21:34: C0326: Exactly one space required after comma
print(2,str([self.board[3],self.board[4],self.board[5]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:21:48: C0326: Exactly one space required after comma
print(2,str([self.board[3],self.board[4],self.board[5]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:21:76: C0326: Exactly one space required after comma
print(2,str([self.board[3],self.board[4],self.board[5]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:21:92: C0326: Exactly one space required after comma
print(2,str([self.board[3],self.board[4],self.board[5]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:22:15: C0326: Exactly one space required after comma
print(3,str([self.board[6],self.board[7],self.board[8]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:22:34: C0326: Exactly one space required after comma
print(3,str([self.board[6],self.board[7],self.board[8]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:22:48: C0326: Exactly one space required after comma
print(3,str([self.board[6],self.board[7],self.board[8]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:22:76: C0326: Exactly one space required after comma
print(3,str([self.board[6],self.board[7],self.board[8]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:22:92: C0326: Exactly one space required after comma
print(3,str([self.board[6],self.board[7],self.board[8]]).replace("'","").replace(",","|"))
^ (bad-whitespace)
board.py:24:35: C0326: No space allowed before comma
print("\n" + self.turn , "turns")
^ (bad-whitespace)
board.py:37:20: C0326: Exactly one space required after comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:22: C0326: Exactly one space required after comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:26: C0326: No space allowed before comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:30: C0326: Exactly one space required after comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:32: C0326: Exactly one space required after comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:36: C0326: No space allowed before comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:40: C0326: Exactly one space required after comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:37:42: C0326: Exactly one space required after comma
for i in [[0,1,2] , [3,4,5] , [6,7,8]]:
^ (bad-whitespace)
board.py:42:16: C0326: Exactly one space required after comma
tmp = [0,3,6]
^ (bad-whitespace)
board.py:42:18: C0326: Exactly one space required after comma
tmp = [0,3,6]
^ (bad-whitespace)
board.py:44:0: W0311: Bad indentation. Found 11 spaces, expected 12 (bad-indentation)
board.py:45:0: W0311: Bad indentation. Found 11 spaces, expected 12 (bad-indentation)
board.py:48:0: C0301: Line too long (128/100) (line-too-long)
board.py:48:59: C0326: Exactly one space required after comma
is_over = abs(sum([self.symbol2value(self.board[0]),self.symbol2value(self.board[4]),self.symbol2value(self.board[8])]))
^ (bad-whitespace)
board.py:48:92: C0326: Exactly one space required after comma
is_over = abs(sum([self.symbol2value(self.board[0]),self.symbol2value(self.board[4]),self.symbol2value(self.board[8])]))
^ (bad-whitespace)
board.py:51:0: C0301: Line too long (128/100) (line-too-long)
board.py:51:59: C0326: Exactly one space required after comma
is_over = abs(sum([self.symbol2value(self.board[2]),self.symbol2value(self.board[4]),self.symbol2value(self.board[6])]))
^ (bad-whitespace)
board.py:51:92: C0326: Exactly one space required after comma
is_over = abs(sum([self.symbol2value(self.board[2]),self.symbol2value(self.board[4]),self.symbol2value(self.board[6])]))
^ (bad-whitespace)
board.py:54:0: C0303: Trailing whitespace (trailing-whitespace)
board.py:62:20: C0326: Exactly one space required after comma
def isValid(self,pos):
^ (bad-whitespace)
board.py:68:17: C0326: Exactly one space required after comma
def move(self,pos):
^ (bad-whitespace)
board.py:1:0: C0111: Missing module docstring (missing-docstring)
board.py:5:0: C0111: Missing class docstring (missing-docstring)
board.py:11:4: C0103: Method name "setBoard" doesn't conform to snake_case naming style (invalid-name)
board.py:11:4: C0111: Missing method docstring (missing-docstring)
board.py:12:11: C0123: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
board.py:18:4: C0111: Missing method docstring (missing-docstring)
board.py:26:4: C0103: Method name "getTurn" doesn't conform to snake_case naming style (invalid-name)
board.py:26:4: C0111: Missing method docstring (missing-docstring)
board.py:29:4: C0103: Method name "changeTurn" doesn't conform to snake_case naming style (invalid-name)
board.py:29:4: C0111: Missing method docstring (missing-docstring)
board.py:35:4: C0103: Method name "isOver" doesn't conform to snake_case naming style (invalid-name)
board.py:35:4: C0111: Missing method docstring (missing-docstring)
board.py:56:8: R1705: Unnecessary "else" after "return" (no-else-return)
board.py:62:4: C0103: Method name "isValid" doesn't conform to snake_case naming style (invalid-name)
board.py:62:4: C0111: Missing method docstring (missing-docstring)
board.py:63:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
board.py:63:8: R1705: Unnecessary "else" after "return" (no-else-return)
board.py:63:11: R1716: Simplify chained comparison between the operands (chained-comparison)
board.py:68:4: C0111: Missing method docstring (missing-docstring)
board.py:69:8: R1705: Unnecessary "else" after "return" (no-else-return)
------------------------------------
Your code has been rated at -2.88/10
I hope you can use these reports to make your codes cleaner.