Skip to content

Commit

Permalink
refactor: clean up some code
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed Oct 26, 2024
1 parent adce986 commit 7a0f9eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions silverback/_build_utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from typing import Union

import click
import shlex
import subprocess

from functools import singledispatchmethod
from pathlib import Path
from typing import Union

import click

DOCKERFILE_CONTENT = """
FROM ghcr.io/apeworx/silverback:stable
Expand Down Expand Up @@ -37,15 +35,11 @@ def generate_path(path: Path):
elif path.is_dir():
return DirPath(str(path))
else:
raise ValueError(
f"{path} is neither a file nor a directory"
)
raise ValueError(f"{path} is neither a file nor a directory")


PathType = Union["FilePath", "DirPath"]

PathType = Union[
"FilePath",
"DirPath"
]

def generate_dockerfiles(path: Path):
path = generate_path(path)
Expand Down
2 changes: 1 addition & 1 deletion silverback/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ape.exceptions import Abort, ApeException
from fief_client.integrations.cli import FiefAuth

from silverback._build_utils import generate_dockerfiles, generate_docker_images
from silverback._build_utils import generate_docker_images, generate_dockerfiles
from silverback._click_ext import (
SectionedHelpGroup,
auth_required,
Expand Down

0 comments on commit 7a0f9eb

Please sign in to comment.