Skip to content

Commit

Permalink
Reforamt.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Jul 29, 2024
1 parent 9751f5f commit bbb972f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def make_doc(ctx: Context) -> None:
"{: .no_toc }\n\n## Table of contents\n{: .no_toc .text-delta }\n* TOC\n{:toc}\n\n",
contents,
)
contents = (
"---\nlayout: default\ntitle: Home\nnav_order: 1\n---\n\n" + contents
)
contents = "---\nlayout: default\ntitle: Home\nnav_order: 1\n---\n\n" + contents

f.write(contents)

Expand Down Expand Up @@ -131,8 +129,7 @@ def commit(ctx: Context) -> None:


@task
def set_ver(ctx: Context, version: str=NEW_VER) -> None:

def set_ver(ctx: Context, version: str = NEW_VER) -> None:
with open("pyproject.toml", encoding="utf-8") as f:
contents = f.read()
contents = re.sub(r"version = ([\.\d\"]+)", f'version = "{version}"', contents)
Expand All @@ -142,7 +139,7 @@ def set_ver(ctx: Context, version: str=NEW_VER) -> None:


@task
def release(ctx: Context, notest: bool = False, version: str=NEW_VER) -> None:
def release(ctx: Context, notest: bool = False, version: str = NEW_VER) -> None:
set_ver(ctx, version)
if not notest:
test(ctx)
Expand Down

0 comments on commit bbb972f

Please sign in to comment.