Skip to content

Commit 0e3732e

Browse files
committed
PullRequest: 26 chore: fmt
Merge branch fmt of [email protected]:oceanbase/OBShell-SDK-Python.git into master https://code.alipay.com/oceanbase/OBShell-SDK-Python/pull_requests/26 Signed-off-by: 阿绿 <[email protected]> * chore: fmt
1 parent df3438b commit 0e3732e

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

obshell/model/ob.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ def from_dict(cls, data: dict):
3939
def __str__(self) -> str:
4040
return model_str(self)
4141

42+
4243
class CdbObBackupTask:
43-
44+
4445
def __init__(self, data: dict):
4546
self.tenant_id = data.get("tenant_id")
4647
self.task_id = data.get("task_id")
@@ -68,36 +69,38 @@ def __init__(self, data: dict):
6869
self.result = data.get("result")
6970
self.comment = data.get("comment")
7071
self.path = data.get("path")
71-
72+
7273
@classmethod
7374
def from_dict(cls, data: dict):
7475
return CdbObBackupTask(data)
75-
76+
7677
def __str__(self) -> str:
7778
return model_str(self)
78-
79+
7980

8081
class CdbObBackupResponse:
81-
82+
8283
def __init__(self, data: dict):
8384
if data.get("statuses"):
84-
self.statuses = [CdbObBackupTask.from_dict(task) for task in data.get('statuses', [])]
85+
self.statuses = [CdbObBackupTask.from_dict(
86+
task) for task in data.get('statuses', [])]
8587
if data.get("status"):
8688
self.status = data.get("status")
8789

8890
@classmethod
8991
def from_dict(cls, data: dict):
9092
return cls(data)
91-
93+
9294
def __str__(self) -> str:
9395
return model_str(self)
9496

95-
class RestoreOverview:
96-
97+
98+
class RestoreOverview:
99+
97100
def __init__(self, data: dict):
98101
self.tenant_id = data.get("tenant_id")
99102
self.job_id = data.get("job_id")
100-
self.restore_tenant_name = data.get("restore_tenant_name")
103+
self.restore_tenant_name = data.get("restore_tenant_name")
101104
self.restore_tenant_id = data.get("restore_tenant_id")
102105
self.backup_tenant_name = data.get("backup_tenant_name")
103106
self.backup_tenant_id = data.get("backup_tenant_id")
@@ -126,11 +129,10 @@ def __init__(self, data: dict):
126129
self.finish_ls_count = data.get("finish_ls_count")
127130
self.comment = data.get("comment")
128131
self.finish_timestamp = data.get("finish_timestamp")
129-
132+
130133
@classmethod
131134
def from_dict(cls, data: dict):
132135
return RestoreOverview(data)
133-
136+
134137
def __str__(self) -> str:
135138
return model_str(self)
136-

0 commit comments

Comments
 (0)