diff options
author | emkael <emkael@tlen.pl> | 2019-12-29 15:45:03 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-12-29 15:45:03 +0100 |
commit | 06bfe301e9b69b8e3264e8ec344a7ca0ff9e6a81 (patch) | |
tree | a15f6775000ae453ab99ecae8bee44a94eecf5d2 | |
parent | ea89502c25f80b2aebbf0d2c187711140d235274 (diff) |
Code formatting
-rw-r--r-- | jfr_playoff/tournamentinfo.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/jfr_playoff/tournamentinfo.py b/jfr_playoff/tournamentinfo.py index e992bc9..70e341f 100644 --- a/jfr_playoff/tournamentinfo.py +++ b/jfr_playoff/tournamentinfo.py @@ -22,10 +22,16 @@ class TournamentInfo: if not self.settings['link'].endswith('leaderb.html'): raise ValueError('invalid link to tournament results') PlayoffLogger.get('tournamentinfo').info( - 'fetching tournament results from leaderboard URL: %s', self.settings['link']) + 'fetching tournament results from leaderboard URL: %s', + self.settings['link']) leaderboard = p_remote.fetch(self.settings['link']) - result_links = [row.select('a[onmouseover]') for row in leaderboard.find_all('tr') if len(row.select('a[onmouseover]')) > 0] - results = [None] * (len(result_links) * max([len(links) for links in result_links])) + result_links = [ + row.select('a[onmouseover]') + for row + in leaderboard.find_all('tr') + if len(row.select('a[onmouseover]')) > 0] + results = [None] * (len(result_links) * max([ + len(links) for links in result_links])) for i in range(0, len(result_links)): for j in range(0, len(result_links[i])): results[len(result_links) * j + i] = result_links[i][j] @@ -105,8 +111,13 @@ class TournamentInfo: contains_digits = any(char.isdigit() for char in leaderb_heading) PlayoffLogger.get('tournamentinfo').info( 'tournament header from HTML: %s, %s', - leaderb_heading, 'contains digits' if contains_digits else "doesn't contain digits") - non_zero_scores = [imps.text for imps in leaderboard.select('td.bdc small') if imps.text != '0-0'] + leaderb_heading, + 'contains digits' if contains_digits else "doesn't contain digits") + non_zero_scores = [ + imps.text + for imps + in leaderboard.select('td.bdc small') + if imps.text != '0-0'] PlayoffLogger.get('tournamentinfo').info( 'tournament leaderboard from HTML: has %d non-zero scores', len(non_zero_scores)) |