style: format and organize imports
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user