Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 18, 2024
1 parent 5e0bc56 commit f94e443
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/runboat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""A simple Odoo runbot lookalike using kubernetes."""

__version__ = "0.2"
3 changes: 1 addition & 2 deletions src/runboat/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class SortOrder(Enum):


class BuildListener(Protocol):
def on_build_event(self, event: BuildEvent, build: Build) -> None:
...
def on_build_event(self, event: BuildEvent, build: Build) -> None: ...


class BuildsDb:
Expand Down
7 changes: 4 additions & 3 deletions src/runboat/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ def _get_kubefiles_path(kubefiles_path: Path | None) -> Generator[Path, None, No
def _render_kubefiles(
kubefiles_path: Path | None, deployment_vars: DeploymentVars
) -> Generator[Path, None, None]:
with _get_kubefiles_path(
kubefiles_path
) as kubefiles_path, tempfile.TemporaryDirectory() as tmp_dir:
with (
_get_kubefiles_path(kubefiles_path) as kubefiles_path,
tempfile.TemporaryDirectory() as tmp_dir,
):
tmp_path = Path(tmp_dir)
_logger.debug("kubefiles path: %s", kubefiles_path)
# TODO async copytree, or make this whole _render_kubefiles run_in_executor
Expand Down
6 changes: 3 additions & 3 deletions src/runboat/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ class Settings(BaseSettings):
# The wildcard domain where the builds will be reacheable.
build_domain: str
# A dictionary of environment variables to set in the build container and jobs.
build_env: dict[str, str] = {} # noqa: RUF012
build_env: dict[str, str] = {}
# A dictionary of secret environment variables to set in the build container and
# jobs.
build_secret_env: dict[str, str] = {} # noqa: RUF012
build_secret_env: dict[str, str] = {}
# A dictionary of variables to be set in the jinja rendering context for the
# kubefiles.
build_template_vars: dict[str, str] = {} # noqa: RUF012
build_template_vars: dict[str, str] = {}
# The path of the default kubefiles to be used.
build_default_kubefiles_path: Annotated[
Path | None, BeforeValidator(validate_path)
Expand Down
2 changes: 1 addition & 1 deletion src/runboat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def inner(*args: Any, **kwargs: Any) -> R:


def sync_to_async_iterator(
iterator_func: Callable[P, Generator[R, None, None]]
iterator_func: Callable[P, Generator[R, None, None]],
) -> Callable[P, AsyncGenerator[R, None]]:
@sync_to_async
def async_next(iterator: Iterator[R]) -> R:
Expand Down

0 comments on commit f94e443

Please sign in to comment.