Skip to content

Commit 6bb9444

Browse files
committed
refactor(mcsmapi): 修正文件相关函数名称和模型字段
- 将 createFloder 修改为 createFolder,统一命名规范 - 将 Filelist 修改为 FileList,修正类名大小写 - 将 actionCommandlist 修改为 actionCommandList,统一字段命名风格
1 parent c345fc8 commit 6bb9444

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mcsmapi/apis/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def createFile(daemonId: str, uuid: str, target: str) -> bool:
313313
)
314314

315315
@staticmethod
316-
def createFloder(daemonId: str, uuid: str, target: str) -> bool:
316+
def createFolder(daemonId: str, uuid: str, target: str) -> bool:
317317
"""
318318
创建文件夹
319319

mcsmapi/models/file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def createFile(self, target: str) -> bool:
211211

212212
return File.createFile(self.daemonId, self.uuid, target)
213213

214-
def createFloder(self, target: str) -> bool:
214+
def createFolder(self, target: str) -> bool:
215215
"""
216216
创建文件夹
217217
@@ -223,7 +223,7 @@ def createFloder(self, target: str) -> bool:
223223
"""
224224
from mcsmapi.apis.file import File
225225

226-
return File.createFloder(self.daemonId, self.uuid, target)
226+
return File.createFolder(self.daemonId, self.uuid, target)
227227

228228

229229
class CommonConfig(BaseModel):

mcsmapi/models/instance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class InstanceConfig(BaseModel):
8484
"""进程类型 (如 docker, local)"""
8585
updateCommand: str = "shutdown -s"
8686
"""更新命令"""
87-
actionCommandlist: list[str] = []
87+
actionCommandList: list[str] = []
8888
"""实例可执行的操作命令列表"""
8989
crlf: CRLFType = CRLFType.CRLF
9090
"""换行符"""
@@ -277,7 +277,7 @@ def files(self, target: str = "", page: int = 0, page_size: int = 100) -> FileLi
277277
- page_size (int, 可选): 指定每页的文件数量。默认为100。
278278
279279
**返回:**
280-
- Filelist: 文件列表。
280+
- FileList: 文件列表。
281281
"""
282282
from mcsmapi.apis.file import File
283283

0 commit comments

Comments
 (0)