Skip to content

Commit

Permalink
chore: add return types for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykayudo committed Oct 25, 2024
1 parent 3a2827e commit 13ee45c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data_handler/handler_tools/data_parser/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class LiquidationEventData(BaseModel):
collateral_amount: str

@field_validator("liquidator", "user", "debt_token", "collateral_token")
def validate_valid_addresses(cls, value: str, info: ValidationInfo):
def validate_valid_addresses(cls, value: str, info: ValidationInfo) -> str:
"""
Check if the value is an address and format it to having leading zeros.
Expand All @@ -43,7 +43,7 @@ def validate_valid_addresses(cls, value: str, info: ValidationInfo):
return add_leading_zeros(value)

@field_validator("debt_raw_amount", "debt_face_amount", "collateral_amount")
def validate_valid_numbers(cls, value: str, info: ValidationInfo):
def validate_valid_numbers(cls, value: str, info: ValidationInfo) -> Decimal:
"""
Check if the value is a digit and convert it to a decimal from base 16 int conversion.
Expand Down

0 comments on commit 13ee45c

Please sign in to comment.