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:
if level.name == name:
return level
raise _error.NotFoundError(
"Level '" + name + "' not found in campaign '" +
self.name + "'")
raise _error.NotFoundError("Level '" + name +
"' not found in campaign '" + self.name +
"'")
def reset(self) -> None:
"""Reset state for the Campaign."""

View File

@ -326,7 +326,8 @@ def get_scan_results() -> ScanResults:
while app.metascan is None:
time.sleep(0.05)
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

View File

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

View File

@ -627,8 +627,8 @@ class AccountSettingsWindow(ba.Window):
elif account_type == 'Game Circle':
account_type_name = ba.Lstr(resource='gameCircleText')
else:
raise ValueError("unknown account type: '" + str(account_type) +
"'")
raise ValueError("unknown account type: '" +
str(account_type) + "'")
self._game_service_button = btn = ba.buttonwidget(
parent=self._subcontainer,
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.
if (not self._in_game and not self._have_quit_button
and ba.app.platform == 'android'):
def _do_quit() -> None:
confirm.QuitWindow(swish=True, back=True)