Skip to content

Commit

Permalink
Add default to _setup for prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dobraczka committed Mar 27, 2023
1 parent 1ea466a commit 028977a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/recite/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
app = typer.Typer()


def _setup(git_tag_prefix: str, allow_untracked_files: bool = False, skip_checks: Optional[str] = None):
def _setup(
git_tag_prefix: str = "",
allow_untracked_files: bool = False,
skip_checks: Optional[str] = None,
):
project_dir = os.getcwd()
console = ReciteConsole()
checks = CheckStepRunner(
Expand Down Expand Up @@ -60,7 +64,9 @@ def release(
commit_message: str = typer.Option(
"Bumped version", help="Commit message for version bump"
),
git_tag_prefix: str = typer.Option("v", help="Prefix for git tag, write 'None' to set it to empty string"),
git_tag_prefix: str = typer.Option(
"v", help="Prefix for git tag, write 'None' to set it to empty string"
),
skip_checks: str = typer.Option(
None,
help="Comma-seperated list of checks referenced by their shortnames. You can print a list of checks with 'recite list-checks'",
Expand All @@ -69,7 +75,9 @@ def release(
if git_tag_prefix == "None":
git_tag_prefix = ""
project_dir, console, checks = _setup(
allow_untracked_files=allow_untracked_files, skip_checks=skip_checks, git_tag_prefix=git_tag_prefix
allow_untracked_files=allow_untracked_files,
skip_checks=skip_checks,
git_tag_prefix=git_tag_prefix,
)
successful = checks.run_steps()
if not successful:
Expand Down

0 comments on commit 028977a

Please # to comment.