Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDing committed Feb 4, 2024
1 parent 5b9a383 commit a2f468b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions alipcs_py/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,11 @@ def play(
"-t",
type=click.Choice([t.name for t in UploadType]),
default=UploadType.Many.name,
help=("上传方式,Many: 同时上传多个文件," "One: 一次只上传一个文件,但同时上传文件的多个分片 " "(阿里网盘不支持单文件并发上传。`upload --upload-type One` 失效)"),
help=(
"上传方式,Many: 同时上传多个文件,"
"One: 一次只上传一个文件,但同时上传文件的多个分片 "
"(阿里网盘不支持单文件并发上传。`upload --upload-type One` 失效)"
),
)
@click.option("--encrypt-password", "--ep", type=str, default=None, help="加密密码,默认使用用户设置的")
@click.option(
Expand Down Expand Up @@ -1575,7 +1579,9 @@ def findshared(ctx, keywords, verbose):

@app.command()
@click.argument("share_ids", nargs=-1, type=str)
@click.option("--keyword", "-k", multiple=True, type=str, help="要删除文件名的关键字,如果为空则删除share_id下的所有文件")
@click.option(
"--keyword", "-k", multiple=True, type=str, help="要删除文件名的关键字,如果为空则删除share_id下的所有文件"
)
@click.pass_context
@handle_error
@save_modified_user_data
Expand Down
2 changes: 1 addition & 1 deletion alipcs_py/storage/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def to_pcs(self) -> PcsSharedLinkInfo:
if col in pcs_fields:
val = getattr(self, col)
if pcs_fields[col].type == typing.Optional[bool] or pcs_fields[col].type == bool:
if val == None:
if val is None:
data[col] = None
else:
data[col] = bool(val)
Expand Down

0 comments on commit a2f468b

Please sign in to comment.