feature: update I/O methods to use questionary where applicable #2
@@ -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 (
|
||||
TRASH_BRANCH_PREFIX,
|
||||
WIP_BRANCH_PREFIX,
|
||||
GitFlowError,
|
||||
)
|
||||
import git_flow.command.base as base
|
||||
from git_flow.git import Git
|
||||
from typing import Annotated
|
||||
import typer
|
||||
from rich.console import Console
|
||||
|
||||
BRANCH_FORMAT = "%(refname:short)"
|
||||
|
||||
app = typer.Typer()
|
||||
console = Console()
|
||||
|
||||
|
||||
@app.command()
|
||||
def branch(
|
||||
environment: Annotated[
|
||||
@@ -79,7 +82,9 @@ def show_branches(branch_prefix: str, current_branch: 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):
|
||||
|
||||
Reference in New Issue
Block a user