File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def get_args():
1414 description = 'Make rhyming "words"' ,
1515 formatter_class = argparse .ArgumentDefaultsHelpFormatter )
1616
17- parser .add_argument ('word' , metavar = 'str ' , help = 'A word to rhyme' )
17+ parser .add_argument ('word' , metavar = 'word ' , help = 'A word to rhyme' )
1818
1919 return parser .parse_args ()
2020
Original file line number Diff line number Diff line change @@ -56,11 +56,9 @@ def main():
5656
5757 args = get_args ()
5858 board = list (args .board )
59- player = args .player
60- cell = args .cell
6159
62- if player and cell :
63- board [cell - 1 ] = player
60+ if args . player and args . cell :
61+ board [args . cell - 1 ] = args . player
6462
6563 print (format_board (board ))
6664 winner = find_winner (board )
Original file line number Diff line number Diff line change @@ -56,11 +56,9 @@ def main():
5656
5757 args = get_args ()
5858 board = list (args .board )
59- player = args .player
60- cell = args .cell
6159
62- if player and cell :
63- board [cell - 1 ] = player
60+ if args . player and args . cell :
61+ board [args . cell - 1 ] = args . player
6462
6563 print (format_board (board ))
6664 winner = find_winner (board )
Original file line number Diff line number Diff line change @@ -63,6 +63,6 @@ def test_losing():
6363
6464 losing_board = list ('XXOO.....' )
6565
66- for i in range (10 ):
66+ for _ in range (10 ):
6767 random .shuffle (losing_board )
68- assert find_winner ('' .join (losing_board )) == None
68+ assert find_winner ('' .join (losing_board )) is None
You can’t perform that action at this time.
0 commit comments