11from enum import StrEnum
2+ from typing import Annotated
23
34from pydantic import Field , NonNegativeInt
45
@@ -13,19 +14,25 @@ class S3Provider(StrEnum):
1314
1415
1516class RCloneSettings (BaseCustomSettings ):
16- R_CLONE_S3 : S3Settings = Field (json_schema_extra = {"auto_default_from_env" : True })
17+ R_CLONE_S3 : Annotated [
18+ S3Settings , Field (json_schema_extra = {"auto_default_from_env" : True })
19+ ]
1720 R_CLONE_PROVIDER : S3Provider
1821
19- # SEE https://rclone.org/docs/#transfers-n
20- R_CLONE_OPTION_TRANSFERS : NonNegativeInt = Field (
21- default = 5 , description = "`--transfers X`: sets the amount of parallel transfers"
22- )
23- # SEE https://rclone.org/docs/#retries-int
24- R_CLONE_OPTION_RETRIES : NonNegativeInt = Field (
25- default = 3 , description = "`--retries X`: times to retry each individual transfer"
26- )
27- # SEE https://rclone.org/docs/#buffer-size-size
28- R_CLONE_OPTION_BUFFER_SIZE : str = Field (
29- default = "16M" ,
30- description = "`--buffer-size X`: sets the amount of RAM to use for each individual transfer" ,
31- )
22+ R_CLONE_OPTION_TRANSFERS : Annotated [
23+ # SEE https://rclone.org/docs/#transfers-n
24+ NonNegativeInt ,
25+ Field (description = "`--transfers X`: sets the amount of parallel transfers" ),
26+ ] = 5
27+ R_CLONE_OPTION_RETRIES : Annotated [
28+ # SEE https://rclone.org/docs/#retries-int
29+ NonNegativeInt ,
30+ Field (description = "`--retries X`: times to retry each individual transfer" ),
31+ ] = 3
32+ R_CLONE_OPTION_BUFFER_SIZE : Annotated [
33+ # SEE https://rclone.org/docs/#buffer-size-size
34+ str ,
35+ Field (
36+ description = "`--buffer-size X`: sets the amount of RAM to use for each individual transfer" ,
37+ ),
38+ ] = "16M"
0 commit comments