Skip to content

Commit 6161b36

Browse files
committed
added proper type guard to _validate_file_mounts and formatted imports
1 parent 7a59166 commit 6161b36

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/runloop_api_client/resources/blueprints.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2-
# isort: skip_file
32

43
from __future__ import annotations
54

@@ -15,8 +14,7 @@
1514
blueprint_create_from_inspection_params,
1615
)
1716
from .._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
18-
from .._utils import maybe_transform, async_maybe_transform
19-
from .._utils._validation import ValidationNotification
17+
from .._utils import is_given, maybe_transform, async_maybe_transform
2018
from .._compat import cached_property
2119
from .._resource import SyncAPIResource, AsyncAPIResource
2220
from .._response import (
@@ -31,6 +29,7 @@
3129
from ..lib.polling import PollingConfig, poll_until
3230
from .._base_client import AsyncPaginator, make_request_options
3331
from ..lib.polling_async import async_poll_until
32+
from .._utils._validation import ValidationNotification
3433
from ..types.blueprint_view import BlueprintView
3534
from ..types.blueprint_preview_view import BlueprintPreviewView
3635
from ..types.inspection_source_param import InspectionSourceParam
@@ -79,7 +78,7 @@ def _validate_file_mounts(file_mounts: Optional[Dict[str, str]] | Omit) -> Valid
7978

8079
note = ValidationNotification()
8180

82-
if file_mounts is omit or file_mounts is None:
81+
if file_mounts is None or not is_given(file_mounts):
8382
return note
8483

8584
total_size_bytes = 0

0 commit comments

Comments
 (0)