flake8: fix W503

This commit is contained in:
Thomas Waldmann 2018-11-22 21:21:52 +01:00
parent e02b241762
commit 9b24a1161b
3 changed files with 15 additions and 7 deletions

View File

@ -63,7 +63,7 @@ filterwarnings =
source = src
[flake8]
ignore = W503
ignore =
max-line-length = 120
exclude = build,dist,.git,.idea,.cache,.tox,.eggs

View File

@ -63,9 +63,13 @@ class BorgCreateThread(BorgThread):
current_wifi = get_current_wifi()
if current_wifi is not None:
wifi_is_disallowed = WifiSettingModel.select().where(
(WifiSettingModel.ssid == current_wifi)
& (WifiSettingModel.allowed is False)
& (WifiSettingModel.profile == profile.id)
(
WifiSettingModel.ssid == current_wifi
) & (
WifiSettingModel.allowed is False
) & (
WifiSettingModel.profile == profile.id
)
)
if wifi_is_disallowed.count() > 0 and profile.repo.is_remote_repo():
ret['message'] = 'Current Wifi is not allowed.'

View File

@ -113,9 +113,13 @@ class VortaScheduler(QtScheduler):
validation_cutoff = date.today() - timedelta(days=7 * profile.validation_weeks)
recent_validations = EventLogModel.select().where(
(EventLogModel.subcommand == 'check')
& (EventLogModel.start_time > validation_cutoff)
& (EventLogModel.repo_url == profile.repo.url)
(
EventLogModel.subcommand == 'check'
) & (
EventLogModel.start_time > validation_cutoff
) & (
EventLogModel.repo_url == profile.repo.url
)
).count()
if profile.validation_on and recent_validations == 0:
msg = BorgCheckThread.prepare(profile)