backup: cleanup flake8 nits

This commit is contained in:
Michael Schmoock
2020-11-30 15:49:30 +01:00
committed by Christian Decker
parent be523aa54f
commit 1f05674b5b
2 changed files with 9 additions and 13 deletions

View File

@@ -245,7 +245,6 @@ class FileBackend(Backend):
assert(version == self.version) assert(version == self.version)
def resolve_backend_class(backend_url): def resolve_backend_class(backend_url):
backend_map: Mapping[str, Type[Backend]] = { backend_map: Mapping[str, Type[Backend]] = {
'file': FileBackend, 'file': FileBackend,
@@ -353,7 +352,6 @@ def kill(message: str):
time.sleep(30) time.sleep(30)
plugin.add_option( plugin.add_option(
'backup-destination', None, 'backup-destination', None,
'UNUSED. Kept for backward compatibility only. Please update your configuration to remove this option.' 'UNUSED. Kept for backward compatibility only. Please update your configuration to remove this option.'

View File

@@ -1,8 +1,6 @@
from backup import FileBackend from backup import FileBackend
from flaky import flaky from flaky import flaky
from pyln.client import RpcError from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.fixtures import *
from pyln.client import RpcError
import os import os
import pytest import pytest
import subprocess import subprocess
@@ -15,6 +13,7 @@ cli_path = os.path.join(os.path.dirname(__file__), "backup-cli")
# For the transition period we require deprecated_apis to be true # For the transition period we require deprecated_apis to be true
deprecated_apis = True deprecated_apis = True
def test_start(node_factory, directory): def test_start(node_factory, directory):
bpath = os.path.join(directory, 'lightning-1', 'regtest') bpath = os.path.join(directory, 'lightning-1', 'regtest')
bdest = 'file://' + os.path.join(bpath, 'backup.dbak') bdest = 'file://' + os.path.join(bpath, 'backup.dbak')
@@ -39,7 +38,6 @@ def test_start_no_init(node_factory, directory):
"""The plugin should refuse to start if we haven't initialized the backup """The plugin should refuse to start if we haven't initialized the backup
""" """
bpath = os.path.join(directory, 'lightning-1', 'regtest') bpath = os.path.join(directory, 'lightning-1', 'regtest')
bdest = 'file://' + os.path.join(bpath, 'backup.dbak')
os.makedirs(bpath) os.makedirs(bpath)
opts = { opts = {
'plugin': plugin_path, 'plugin': plugin_path,