Skip to content

Commit 6cb2b48

Browse files
committed
fix: mypy errors
1 parent 7df2639 commit 6cb2b48

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/hydrator/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def hydration_worker(
5151
gatekeeper_validation: bool,
5252
gatekeeper_constraints: list[pathlib.Path],
5353
preserve_temp: bool,
54-
split_output: bool
54+
split_output: bool,
55+
hydration_type: HydrateType
5556
) -> HydrationResult:
5657
"""
5758
Top-level function to be executed by each worker process.
@@ -100,6 +101,7 @@ def hydration_worker(
100101
validators=validators,
101102
preserve_temp=preserve_temp,
102103
split_output=split_output,
104+
hydration_type=hydration_type
103105
)
104106

105107
# Each worker runs its own asyncio event loop for the hydration task.
@@ -523,6 +525,7 @@ def _hydrate(self, config_data: SotConfig) -> None:
523525
self._gatekeeper_constraints,
524526
self._preserve_temp,
525527
self._split_output,
528+
self._hyd_type,
526529
)
527530
futures[future] = cfg.name
528531

src/hydrator/hydration.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BaseHydrator(LoggingMixin):
3737
""" Implements a specific hydration flow """
3838
_jinja_env: jinja2.Environment
3939
_hydration_dest: pathlib.Path
40-
_oci_client: OCIClient
40+
_oci_client: OCIClient | None
4141
_visited_files: Set[pathlib.Path]
4242

4343
__slots__ = [
@@ -57,7 +57,7 @@ def __init__(self, *,
5757
modules_path: pathlib.Path,
5858
hydrated_path: pathlib.Path,
5959
output_subdir: str,
60-
oci_client: OCIClient,
60+
oci_client: OCIClient | None,
6161
oci_tags: Set[str],
6262
hydration_type: HydrateType,
6363
validators: list[BaseValidator] | None = None,
@@ -487,10 +487,11 @@ def _publish(self) -> None:
487487
self._logger,
488488
)
489489

490-
self._oci_client.push(
491-
packaged_manifest_path,
492-
self.name,
493-
self.oci_tags)
490+
if self._oci_client:
491+
self._oci_client.push(
492+
packaged_manifest_path,
493+
self.name,
494+
self.oci_tags)
494495

495496
async def run(self) -> None:
496497
"""Orchestrates the hydration process flow.

0 commit comments

Comments
 (0)