Skip to content

Commit

Permalink
Update serializer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang committed Dec 6, 2023
1 parent d1d562a commit 7203f52
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/python_rucaptcha/core/serializer.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7203f52

Please sign in to comment.