Skip to content

Commit

Permalink
fix: hexint madness
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 23, 2024
1 parent 3aa67bd commit 1685f94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/ape/api/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
from eth_pydantic_types import HexBytes
from eth_utils import keccak, to_int
from ethpm_types import BaseModel, ContractType
from ethpm_types import ContractType
from ethpm_types.abi import ABIType, ConstructorABI, EventABI, MethodABI
from pydantic import model_validator

Expand All @@ -31,6 +31,7 @@
from ape.types.gas import AutoGasLimit, GasLimit
from ape.utils.basemodel import (
BaseInterfaceModel,
BaseModel,
ExtraAttributesMixin,
ExtraModelAttributes,
ManagerAccessMixin,
Expand Down
2 changes: 1 addition & 1 deletion src/ape/types/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def _hex_int_validator(value, info):
return convert(value, int)


HexInt = Annotated[int, BeforeValidator(lambda v, info: None if v is None else _hex_int_validator)]
HexInt = Annotated[int, BeforeValidator(_hex_int_validator)]
"""
Validate any hex-str or bytes into an integer.
To be used on pydantic-fields.
Expand Down
3 changes: 1 addition & 2 deletions src/ape/types/gas.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Literal, Union

from ethpm_types import BaseModel
from pydantic import field_validator
from pydantic import BaseModel, field_validator


class AutoGasLimit(BaseModel):
Expand Down

0 comments on commit 1685f94

Please sign in to comment.