oops pycharm formatting differ

This commit is contained in:
Roman Trapeznikov 2020-05-21 19:21:48 +03:00
parent 976cf18247
commit 19591e128b
No known key found for this signature in database
GPG Key ID: 827DD41DACE1E018
7 changed files with 46 additions and 47 deletions

View File

@ -78,9 +78,9 @@ class Campaign:
for level in self._levels: for level in self._levels:
if level.name == name: if level.name == name:
return level return level
raise _error.NotFoundError( raise _error.NotFoundError("Level '" + name +
"Level '" + name + "' not found in campaign '" + "' not found in campaign '" + self.name +
self.name + "'") "'")
def reset(self) -> None: def reset(self) -> None:
"""Reset state for the Campaign.""" """Reset state for the Campaign."""

View File

@ -326,7 +326,8 @@ def get_scan_results() -> ScanResults:
while app.metascan is None: while app.metascan is None:
time.sleep(0.05) time.sleep(0.05)
if time.time() - starttime > 10.0: if time.time() - starttime > 10.0:
raise TimeoutError('timeout waiting for meta scan to complete.') raise TimeoutError(
'timeout waiting for meta scan to complete.')
return app.metascan return app.metascan

View File

@ -387,8 +387,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
label=ba.Lstr(resource='tournamentStandingsText') label=ba.Lstr(resource='tournamentStandingsText')
if self.session.tournament_id is not None else ba.Lstr( if self.session.tournament_id is not None else ba.Lstr(
resource='worldsBestScoresText') if self._score_type resource='worldsBestScoresText') if self._score_type
== 'points' else ba.Lstr( == 'points' else ba.Lstr(resource='worldsBestTimesText'),
resource='worldsBestTimesText'),
autoselect=True, autoselect=True,
on_activate_call=ba.WeakCall(self._ui_worlds_best), on_activate_call=ba.WeakCall(self._ui_worlds_best),
transition_delay=delay + 1.9, transition_delay=delay + 1.9,
@ -729,8 +728,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
txt = Text(ba.Lstr(resource='tournamentStandingsText') txt = Text(ba.Lstr(resource='tournamentStandingsText')
if self.session.tournament_id is not None else ba.Lstr( if self.session.tournament_id is not None else ba.Lstr(
resource='worldsBestScoresText') if self._score_type resource='worldsBestScoresText') if self._score_type
== 'points' else ba.Lstr( == 'points' else ba.Lstr(resource='worldsBestTimesText'),
resource='worldsBestTimesText'),
maxwidth=210, maxwidth=210,
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20), position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
transition=Text.Transition.IN_LEFT, transition=Text.Transition.IN_LEFT,
@ -766,8 +764,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
ts_h_offs = -480 ts_h_offs = -480
v_offs = 40 v_offs = 40
Text(ba.Lstr(resource='yourBestScoresText') if self._score_type Text(ba.Lstr(resource='yourBestScoresText') if self._score_type
== 'points' else ba.Lstr( == 'points' else ba.Lstr(resource='yourBestTimesText'),
resource='yourBestTimesText'),
maxwidth=210, maxwidth=210,
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20), position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
transition=Text.Transition.IN_RIGHT, transition=Text.Transition.IN_RIGHT,

View File

@ -627,8 +627,8 @@ class AccountSettingsWindow(ba.Window):
elif account_type == 'Game Circle': elif account_type == 'Game Circle':
account_type_name = ba.Lstr(resource='gameCircleText') account_type_name = ba.Lstr(resource='gameCircleText')
else: else:
raise ValueError("unknown account type: '" + str(account_type) + raise ValueError("unknown account type: '" +
"'") str(account_type) + "'")
self._game_service_button = btn = ba.buttonwidget( self._game_service_button = btn = ba.buttonwidget(
parent=self._subcontainer, parent=self._subcontainer,
position=((self._sub_width - button_width) * 0.5, v), position=((self._sub_width - button_width) * 0.5, v),

View File

@ -321,6 +321,7 @@ class MainMenuWindow(ba.Window):
# we want back presses to quit our activity. # we want back presses to quit our activity.
if (not self._in_game and not self._have_quit_button if (not self._in_game and not self._have_quit_button
and ba.app.platform == 'android'): and ba.app.platform == 'android'):
def _do_quit() -> None: def _do_quit() -> None:
confirm.QuitWindow(swish=True, back=True) confirm.QuitWindow(swish=True, back=True)