runwayml 3.10.1__py3-none-any.whl → 3.10.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runwayml/_models.py +1 -1
- runwayml/_types.py +35 -1
- runwayml/_utils/__init__.py +1 -0
- runwayml/_utils/_typing.py +5 -0
- runwayml/_version.py +1 -1
- {runwayml-3.10.1.dist-info → runwayml-3.10.3.dist-info}/METADATA +1 -1
- {runwayml-3.10.1.dist-info → runwayml-3.10.3.dist-info}/RECORD +9 -9
- {runwayml-3.10.1.dist-info → runwayml-3.10.3.dist-info}/WHEEL +0 -0
- {runwayml-3.10.1.dist-info → runwayml-3.10.3.dist-info}/licenses/LICENSE +0 -0
runwayml/_models.py
CHANGED
@@ -304,7 +304,7 @@ class BaseModel(pydantic.BaseModel):
|
|
304
304
|
exclude_none=exclude_none,
|
305
305
|
)
|
306
306
|
|
307
|
-
return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped
|
307
|
+
return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped
|
308
308
|
|
309
309
|
@override
|
310
310
|
def model_dump_json(
|
runwayml/_types.py
CHANGED
@@ -13,10 +13,21 @@ from typing import (
|
|
13
13
|
Mapping,
|
14
14
|
TypeVar,
|
15
15
|
Callable,
|
16
|
+
Iterator,
|
16
17
|
Optional,
|
17
18
|
Sequence,
|
18
19
|
)
|
19
|
-
from typing_extensions import
|
20
|
+
from typing_extensions import (
|
21
|
+
Set,
|
22
|
+
Literal,
|
23
|
+
Protocol,
|
24
|
+
TypeAlias,
|
25
|
+
TypedDict,
|
26
|
+
SupportsIndex,
|
27
|
+
overload,
|
28
|
+
override,
|
29
|
+
runtime_checkable,
|
30
|
+
)
|
20
31
|
|
21
32
|
import httpx
|
22
33
|
import pydantic
|
@@ -217,3 +228,26 @@ class _GenericAlias(Protocol):
|
|
217
228
|
class HttpxSendArgs(TypedDict, total=False):
|
218
229
|
auth: httpx.Auth
|
219
230
|
follow_redirects: bool
|
231
|
+
|
232
|
+
|
233
|
+
_T_co = TypeVar("_T_co", covariant=True)
|
234
|
+
|
235
|
+
|
236
|
+
if TYPE_CHECKING:
|
237
|
+
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
|
238
|
+
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
|
239
|
+
class SequenceNotStr(Protocol[_T_co]):
|
240
|
+
@overload
|
241
|
+
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
|
242
|
+
@overload
|
243
|
+
def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
|
244
|
+
def __contains__(self, value: object, /) -> bool: ...
|
245
|
+
def __len__(self) -> int: ...
|
246
|
+
def __iter__(self) -> Iterator[_T_co]: ...
|
247
|
+
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
|
248
|
+
def count(self, value: Any, /) -> int: ...
|
249
|
+
def __reversed__(self) -> Iterator[_T_co]: ...
|
250
|
+
else:
|
251
|
+
# just point this to a normal `Sequence` at runtime to avoid having to special case
|
252
|
+
# deserializing our custom sequence type
|
253
|
+
SequenceNotStr = Sequence
|
runwayml/_utils/__init__.py
CHANGED
@@ -38,6 +38,7 @@ from ._typing import (
|
|
38
38
|
extract_type_arg as extract_type_arg,
|
39
39
|
is_iterable_type as is_iterable_type,
|
40
40
|
is_required_type as is_required_type,
|
41
|
+
is_sequence_type as is_sequence_type,
|
41
42
|
is_annotated_type as is_annotated_type,
|
42
43
|
is_type_alias_type as is_type_alias_type,
|
43
44
|
strip_annotated_type as strip_annotated_type,
|
runwayml/_utils/_typing.py
CHANGED
@@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool:
|
|
26
26
|
return (get_origin(typ) or typ) == list
|
27
27
|
|
28
28
|
|
29
|
+
def is_sequence_type(typ: type) -> bool:
|
30
|
+
origin = get_origin(typ) or typ
|
31
|
+
return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence
|
32
|
+
|
33
|
+
|
29
34
|
def is_iterable_type(typ: type) -> bool:
|
30
35
|
"""If the given type is `typing.Iterable[T]`"""
|
31
36
|
origin = get_origin(typ) or typ
|
runwayml/_version.py
CHANGED
@@ -5,15 +5,15 @@ runwayml/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
|
5
5
|
runwayml/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
6
6
|
runwayml/_exceptions.py,sha256=p2Q8kywHCVQzArLQL4Ht-HetTBhAvevU6yDvEq7PpIE,3224
|
7
7
|
runwayml/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
|
8
|
-
runwayml/_models.py,sha256=
|
8
|
+
runwayml/_models.py,sha256=6rDtUmk6jhjGN1q96CUICYfBunNXNhhEk_AqztTm3uE,30012
|
9
9
|
runwayml/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
10
10
|
runwayml/_resource.py,sha256=BF-j3xY5eRTKmuTxg8eDhLtLP4MLB1phDh_B6BKipKA,1112
|
11
11
|
runwayml/_response.py,sha256=WxjSEXX-j01ZhlSxYyMCVSEKxo20pgy40RA7iyski8M,28800
|
12
12
|
runwayml/_streaming.py,sha256=NSVuAgknVQWU1cgZEjQn01IdZKKynb5rOeYp5Lo-OEQ,10108
|
13
|
-
runwayml/_types.py,sha256=
|
14
|
-
runwayml/_version.py,sha256=
|
13
|
+
runwayml/_types.py,sha256=x9kxQosdf8uFYdVp9BA2p97HMcdp9M4oky-BbC5t1TU,7298
|
14
|
+
runwayml/_version.py,sha256=Y1YE2tza1YzWn3Szhus-4O4mDa_p2Axr-1UHy80f2Bg,161
|
15
15
|
runwayml/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
runwayml/_utils/__init__.py,sha256=
|
16
|
+
runwayml/_utils/__init__.py,sha256=QMTNChOzCs5KF_NTxyb5XpFyyfmHiQASrFovz3dHmK8,2104
|
17
17
|
runwayml/_utils/_logs.py,sha256=ZfS5W59hdqEBVV86lNrk28PhvUxtHOzs9JqiLhSu0pI,780
|
18
18
|
runwayml/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
19
19
|
runwayml/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
@@ -21,7 +21,7 @@ runwayml/_utils/_resources_proxy.py,sha256=mWtL945pucAKizHQ2ipewCIL-HijKdldUm72C
|
|
21
21
|
runwayml/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
22
22
|
runwayml/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
23
23
|
runwayml/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
|
24
|
-
runwayml/_utils/_typing.py,sha256=
|
24
|
+
runwayml/_utils/_typing.py,sha256=UAoN7JEd8A-T32Cju-dL5EyqWKO_ktG4VDQ3KOhzqG0,4787
|
25
25
|
runwayml/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
26
26
|
runwayml/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
27
27
|
runwayml/lib/polling.py,sha256=4fF0gP-h4iR0jvxWifsqtR1iH9vRoKEgGykkaZNT9Ek,4743
|
@@ -48,7 +48,7 @@ runwayml/types/video_to_video_create_params.py,sha256=0qfsIDlcTpqn9eiY-7X0J1NuDQ
|
|
48
48
|
runwayml/types/video_to_video_create_response.py,sha256=CXgAUmnPIZOxCW_macIBPOC8MZYQpq9a5_jteSkeBt8,264
|
49
49
|
runwayml/types/video_upscale_create_params.py,sha256=Ta3BNQy9aeTUBU5Ui-CMJtF32HeNRqbNpqjAAOKXyks,743
|
50
50
|
runwayml/types/video_upscale_create_response.py,sha256=zf-79HbJa68dUHltBiZjVtnW_U6HUI-htmkTm5URBSU,264
|
51
|
-
runwayml-3.10.
|
52
|
-
runwayml-3.10.
|
53
|
-
runwayml-3.10.
|
54
|
-
runwayml-3.10.
|
51
|
+
runwayml-3.10.3.dist-info/METADATA,sha256=yUZbWLlxKukcasmKbGh1JKPOBEdehaVX3V97nq9XR8U,15158
|
52
|
+
runwayml-3.10.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
53
|
+
runwayml-3.10.3.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
|
54
|
+
runwayml-3.10.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|