Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c35ecc6

Browse files
author
vshepard
committed
Code style fixes
1 parent 719daaf commit c35ecc6

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

testgres/plugins/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from pg_probackup2.storage.fs_backup import FSTestBackupDir
55
from pg_probackup2.storage.s3_backup import S3TestBackupDir
66

7-
87
__all__ = [
9-
"ProbackupApp", "ProbackupException", "init_params", "FSTestBackupDir", "S3TestBackupDir", "GDBobj"
10-
]
8+
"ProbackupApp", "ProbackupException", "init_params", "FSTestBackupDir", "S3TestBackupDir", "GDBobj"
9+
]

testgres/plugins/pg_probackup2/pg_probackup2/app.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
warning = """
1919
Wrong splint in show_pb
20-
Original Header:
20+
Original Header:f
2121
{header}
2222
Original Body:
2323
{body}
@@ -139,14 +139,12 @@ def run(self, command, gdb=False, old_binary=False, return_id=True, env=None,
139139
def init(self, options=None, old_binary=False, skip_log_directory=False, expect_error=False, use_backup_dir=True):
140140
if options is None:
141141
options = []
142-
return self.run([
143-
'init',
144-
] + options,
145-
old_binary=old_binary,
146-
skip_log_directory=skip_log_directory,
147-
expect_error=expect_error,
148-
use_backup_dir=use_backup_dir
149-
)
142+
return self.run(['init'] + options,
143+
old_binary=old_binary,
144+
skip_log_directory=skip_log_directory,
145+
expect_error=expect_error,
146+
use_backup_dir=use_backup_dir
147+
)
150148

151149
def add_instance(self, instance, node, old_binary=False, options=None, expect_error=False):
152150
if options is None:
@@ -545,7 +543,6 @@ def show_archive(
545543
break
546544

547545
if tli > 0:
548-
timeline_data = None
549546
for timeline in instance_timelines:
550547
if timeline['tli'] == tli:
551548
return timeline
@@ -674,7 +671,7 @@ def set_archiving(
674671
archive_command += ' --remote-proto=ssh --remote-host=localhost'
675672

676673
if init_params.archive_compress and compress:
677-
archive_command += ' --compress-algorithm='+init_params.archive_compress
674+
archive_command += ' --compress-algorithm=' + init_params.archive_compress
678675

679676
if overwrite:
680677
archive_command += ' --overwrite'
@@ -758,8 +755,8 @@ def load_backup_class(fs_type):
758755
if root not in sys.path:
759756
sys.path.append(root)
760757
from pg_probackup2.storage.s3_backup import S3TestBackupDir
758+
761759
fs_backup_class = S3TestBackupDir
762760

763761
def build_backup_dir(self, backup='backup'):
764762
return fs_backup_class(rel_path=self.rel_path, backup=backup)
765-

testgres/plugins/pg_probackup2/pg_probackup2/storage/s3_backup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
from minio import Minio
77
from minio.deleteobjects import DeleteObject
88
import urllib3
9+
from .fs_backup import TestBackupDir
910

1011
root = os.path.realpath(os.path.join(os.path.dirname(__file__), '../..'))
1112
if root not in sys.path:
1213
sys.path.append(root)
1314

14-
from .fs_backup import TestBackupDir
15-
1615
# Should fail if either of env vars does not exist
1716
host = os.environ['PG_PROBACKUP_S3_HOST']
1817
port = os.environ['PG_PROBACKUP_S3_PORT']

0 commit comments

Comments
 (0)