11from __future__ import annotations
22
3- from typing import TYPE_CHECKING , Any
3+ from typing import Any
44
5- from apify_client ._models import Version
5+ from apify_client ._models import Version , VersionSourceType
66from apify_client ._resource_clients .actor_env_var import ActorEnvVarClient , ActorEnvVarClientAsync
77from apify_client ._resource_clients .actor_env_var_collection import (
88 ActorEnvVarCollectionClient ,
1111from apify_client ._resource_clients .base import ResourceClient , ResourceClientAsync
1212from apify_client ._utils import filter_out_none_values_recursively , maybe_extract_enum_member_value
1313
14- if TYPE_CHECKING :
15- from apify_shared .consts import ActorSourceType
16-
1714
1815def _get_actor_version_representation (
1916 * ,
2017 version_number : str | None = None ,
2118 build_tag : str | None = None ,
2219 env_vars : list [dict ] | None = None ,
2320 apply_env_vars_to_build : bool | None = None ,
24- source_type : ActorSourceType | None = None ,
21+ source_type : VersionSourceType | None = None ,
2522 source_files : list [dict ] | None = None ,
2623 git_repo_url : str | None = None ,
2724 tarball_url : str | None = None ,
@@ -64,7 +61,7 @@ def update(
6461 build_tag : str | None = None ,
6562 env_vars : list [dict ] | None = None ,
6663 apply_env_vars_to_build : bool | None = None ,
67- source_type : ActorSourceType | None = None ,
64+ source_type : VersionSourceType | None = None ,
6865 source_files : list [dict ] | None = None ,
6966 git_repo_url : str | None = None ,
7067 tarball_url : str | None = None ,
@@ -82,13 +79,13 @@ def update(
8279 be set to the Actor build process.
8380 source_type: What source type is the Actor version using.
8481 source_files: Source code comprised of multiple files, each an item of the array. Required when
85- `source_type` is `ActorSourceType .SOURCE_FILES`. See the API docs for the exact structure.
82+ `source_type` is `VersionSourceType .SOURCE_FILES`. See the API docs for the exact structure.
8683 git_repo_url: The URL of a Git repository from which the source code will be cloned.
87- Required when `source_type` is `ActorSourceType .GIT_REPO`.
84+ Required when `source_type` is `VersionSourceType .GIT_REPO`.
8885 tarball_url: The URL of a tarball or a zip archive from which the source code will be downloaded.
89- Required when `source_type` is `ActorSourceType .TARBALL`.
86+ Required when `source_type` is `VersionSourceType .TARBALL`.
9087 github_gist_url: The URL of a GitHub Gist from which the source will be downloaded.
91- Required when `source_type` is `ActorSourceType .GITHUB_GIST`.
88+ Required when `source_type` is `VersionSourceType .GITHUB_GIST`.
9289
9390 Returns:
9491 The updated Actor version.
@@ -154,7 +151,7 @@ async def update(
154151 build_tag : str | None = None ,
155152 env_vars : list [dict ] | None = None ,
156153 apply_env_vars_to_build : bool | None = None ,
157- source_type : ActorSourceType | None = None ,
154+ source_type : VersionSourceType | None = None ,
158155 source_files : list [dict ] | None = None ,
159156 git_repo_url : str | None = None ,
160157 tarball_url : str | None = None ,
@@ -172,13 +169,13 @@ async def update(
172169 be set to the Actor build process.
173170 source_type: What source type is the Actor version using.
174171 source_files: Source code comprised of multiple files, each an item of the array. Required when
175- `source_type` is `ActorSourceType .SOURCE_FILES`. See the API docs for the exact structure.
172+ `source_type` is `VersionSourceType .SOURCE_FILES`. See the API docs for the exact structure.
176173 git_repo_url: The URL of a Git repository from which the source code will be cloned.
177- Required when `source_type` is `ActorSourceType .GIT_REPO`.
174+ Required when `source_type` is `VersionSourceType .GIT_REPO`.
178175 tarball_url: The URL of a tarball or a zip archive from which the source code will be downloaded.
179- Required when `source_type` is `ActorSourceType .TARBALL`.
176+ Required when `source_type` is `VersionSourceType .TARBALL`.
180177 github_gist_url: The URL of a GitHub Gist from which the source will be downloaded.
181- Required when `source_type` is `ActorSourceType .GITHUB_GIST`.
178+ Required when `source_type` is `VersionSourceType .GITHUB_GIST`.
182179
183180 Returns:
184181 The updated Actor version.
0 commit comments