Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/runloop_api_client/resources/blueprints.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
# isort: skip_file

from __future__ import annotations

Expand All @@ -15,8 +14,7 @@
blueprint_create_from_inspection_params,
)
from .._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._utils._validation import ValidationNotification
from .._utils import is_given, maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import (
Expand All @@ -31,6 +29,7 @@
from ..lib.polling import PollingConfig, poll_until
from .._base_client import AsyncPaginator, make_request_options
from ..lib.polling_async import async_poll_until
from .._utils._validation import ValidationNotification
from ..types.blueprint_view import BlueprintView
from ..types.blueprint_preview_view import BlueprintPreviewView
from ..types.inspection_source_param import InspectionSourceParam
Expand Down Expand Up @@ -79,7 +78,7 @@ def _validate_file_mounts(file_mounts: Optional[Dict[str, str]] | Omit) -> Valid

note = ValidationNotification()

if file_mounts is omit or file_mounts is None:
if file_mounts is None or not is_given(file_mounts):
return note

total_size_bytes = 0
Expand Down Expand Up @@ -327,11 +326,13 @@ def create_and_await_build_complete(
base_blueprint_id: Optional[str] | Omit = omit,
base_blueprint_name: Optional[str] | Omit = omit,
build_args: Optional[Dict[str, str]] | Omit = omit,
build_context: Optional[blueprint_create_params.BuildContext] | Omit = omit,
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
dockerfile: Optional[str] | Omit = omit,
file_mounts: Optional[Dict[str, str]] | Omit = omit,
launch_parameters: Optional[LaunchParameters] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
named_build_contexts: Optional[Dict[str, blueprint_create_params.NamedBuildContexts]] | Omit = omit,
secrets: Optional[Dict[str, str]] | Omit = omit,
services: Optional[Iterable[blueprint_create_params.Service]] | Omit = omit,
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
Expand Down Expand Up @@ -365,11 +366,13 @@ def create_and_await_build_complete(
base_blueprint_id=base_blueprint_id,
base_blueprint_name=base_blueprint_name,
build_args=build_args,
build_context=build_context,
code_mounts=code_mounts,
dockerfile=dockerfile,
file_mounts=file_mounts,
launch_parameters=launch_parameters,
metadata=metadata,
named_build_contexts=named_build_contexts,
secrets=secrets,
services=services,
system_setup_commands=system_setup_commands,
Expand Down