summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2015-09-01 12:25:01 +0200
committeremkael <emkael@tlen.pl>2015-09-01 12:25:01 +0200
commit574b520feb10423e9be8d4446038c5c06205d01f (patch)
tree34d6fd6e98f8281563c54017d21b70d327481fca
parent08bd0d1ec1662372f17831cf551224ff762a1b72 (diff)
* pep8
-rw-r--r--bidding_data.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/bidding_data.py b/bidding_data.py
index d2a4106..d49d9b0 100644
--- a/bidding_data.py
+++ b/bidding_data.py
@@ -127,12 +127,12 @@ class JFRBidding:
str(sector_no),
str(table_no)])
self.__board_number_mapping[
- board_string] = jfr_number + board_number - \
- int(round_data[5])
+ board_string
+ ] = jfr_number + board_number - int(round_data[5])
# only include these board numbers from mapping
# which actually exist in JFR output
custom_files = []
- for board_number, jfr_number in self.__board_number_mapping.iteritems():
+ for b_number, jfr_number in self.__board_number_mapping.iteritems():
board_files = [
f for f
in self.__tournament_files
@@ -140,7 +140,7 @@ class JFRBidding:
if len(board_files):
custom_files = custom_files + board_files
else:
- self.__board_number_mapping[board_number] = None
+ self.__board_number_mapping[b_number] = None
self.__tournament_files = custom_files
# sitting read from BWS
@@ -183,13 +183,14 @@ class JFRBidding:
for bid_index in bidding:
bid = round_data[bid_index]
bidding_table[
- self.__directions.index(bid['direction'])
- ].append(bid['bid'])
+ self.__directions.index(
+ bid['direction'])].append(
+ bid['bid'])
last_bidder = bid['direction']
# fill skipped calls for players before dealer
# in the first round of bidding
for pos in range(
- 0, self.__directions.index(dealer)):
+ 0, self.__directions.index(dealer)):
bidding_table[pos].insert(0, '')
# fill skipped calls for players after pass out
# (so that bidding table is a proper matrix)
@@ -198,7 +199,7 @@ class JFRBidding:
len(self.__directions)):
bidding_table[pos].append('')
# transpose the bidding table
- # aligning it row-by-row (bidding round-by-round)
+ # aligning it row-by-row (bid round-by-round)
bidding_table = map(list, zip(*bidding_table))
bidding_fpath = \
self.__get_bidding_file_output_path(
@@ -299,7 +300,7 @@ if __name__ == '__main__':
type=file_path)
argument_parser.add_argument('path', metavar='PATH',
help='tournament path (to PREFIX.html)',
- type=file_path)
+ type=file_path)
arguments = argument_parser.parse_args()