diff --git a/src/python_rucaptcha/core/serializer.py b/src/python_rucaptcha/core/serializer.py index 8cc1c1cd..87f5c200 100644 --- a/src/python_rucaptcha/core/serializer.py +++ b/src/python_rucaptcha/core/serializer.py @@ -1,13 +1,10 @@ -from typing import Literal, Optional, Annotated +from typing import Literal, Optional -from msgspec import Meta, Struct +from msgspec import Struct from . import enums from .config import APP_KEY -PositiveInt = Annotated[int, Meta(ge=5)] -MinLenStr = Annotated[int, Meta(min_length=32, max_length=32)] - class MyBaseModel(Struct): def to_dict(self): @@ -42,7 +39,7 @@ class GetTaskResultRequestSer(MyBaseModel): class CaptchaOptionsSer(MyBaseModel): - sleep_time: PositiveInt = 10 + sleep_time: int = 10 service_type: enums.ServiceEnm = enums.ServiceEnm.TWOCAPTCHA.value url_request: Optional[str] = None