diff --git a/src/runboat/__init__.py b/src/runboat/__init__.py index 0faaaed..ded49ca 100644 --- a/src/runboat/__init__.py +++ b/src/runboat/__init__.py @@ -1,2 +1,3 @@ """A simple Odoo runbot lookalike using kubernetes.""" + __version__ = "0.2" diff --git a/src/runboat/db.py b/src/runboat/db.py index f83a32f..bc984e8 100644 --- a/src/runboat/db.py +++ b/src/runboat/db.py @@ -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: diff --git a/src/runboat/k8s.py b/src/runboat/k8s.py index b24dde0..9d95633 100644 --- a/src/runboat/k8s.py +++ b/src/runboat/k8s.py @@ -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 diff --git a/src/runboat/settings.py b/src/runboat/settings.py index a561838..7a743b0 100644 --- a/src/runboat/settings.py +++ b/src/runboat/settings.py @@ -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) diff --git a/src/runboat/utils.py b/src/runboat/utils.py index 8c7f360..361c283 100644 --- a/src/runboat/utils.py +++ b/src/runboat/utils.py @@ -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: