feature: update I/O methods to use questionary where applicable #2

Merged
jt merged 14 commits from feature/refactor-use-questionary-package into main 2026-07-18 01:12:23 +00:00
Showing only changes of commit 726df217ec - Show all commits
+10 -5
View File
@@ -1,19 +1,22 @@
from typing import Annotated
import typer
from rich.console import Console
import git_flow.command.base as base
from git_flow import ( from git_flow import (
TRASH_BRANCH_PREFIX, TRASH_BRANCH_PREFIX,
WIP_BRANCH_PREFIX, WIP_BRANCH_PREFIX,
GitFlowError, GitFlowError,
) )
import git_flow.command.base as base
from git_flow.git import Git from git_flow.git import Git
from typing import Annotated
import typer
from rich.console import Console
BRANCH_FORMAT = "%(refname:short)" BRANCH_FORMAT = "%(refname:short)"
app = typer.Typer() app = typer.Typer()
console = Console() console = Console()
@app.command() @app.command()
def branch( def branch(
environment: Annotated[ environment: Annotated[
@@ -79,7 +82,9 @@ def show_branches(branch_prefix: str, current_branch: str):
def get_branches(branch_prefix: str): def get_branches(branch_prefix: str):
return Git("for-each-ref", "refs/heads/" + branch_prefix, format=BRANCH_FORMAT).lines() return Git(
"for-each-ref", "refs/heads/" + branch_prefix, format=BRANCH_FORMAT
).lines()
def show_all_branches(environments: list[str], current_branch: str): def show_all_branches(environments: list[str], current_branch: str):