Skip to content

Commit

Permalink
fix: revert genexp and move constants to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored May 30, 2024
1 parent 1ec832d commit d9fb841
Showing 1 changed file with 70 additions and 2 deletions.
72 changes: 70 additions & 2 deletions brownie/test/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

ArrayLengthType = Union[int, list, None]
NumberType = Union[float, int, None]
EvmIntType = Literal[tuple(f"int{i}" for i in range(8, 257, 8))]
EvmUintType = Literal[tuple(f"uint{i}" for i in range(8, 257, 8))]

class _DeferredStrategyRepr(DeferredStrategy):
def __init__(self, fn: Callable, repr_target: str) -> None:
Expand Down Expand Up @@ -183,3 +181,73 @@ def strategy(type_str: str, **kwargs: Any) -> SearchStrategy:
return _bytes_strategy(abi_type, **kwargs)

raise ValueError(f"No strategy available for type: {type_str}")

EvmIntType = Literal[
"int8",
"int16",
"int24",
"int32",
"int40",
"int48",
"int56",
"int64",
"int72",
"int80",
"int88",
"int96",
"int104",
"int112",
"int120",
"int128",
"int136",
"int144",
"int152",
"int160",
"int168",
"int176",
"int184",
"int192",
"int200",
"int208",
"int216",
"int224",
"int232",
"int240",
"int248",
"int256",
]

EvmUintType = Literal[
"uint8",
"uint16",
"uint24",
"uint32",
"uint40",
"uint48",
"uint56",
"uint64",
"uint72",
"uint80",
"uint88",
"uint96",
"uint104",
"uint112",
"uint120",
"uint128",
"uint136",
"uint144",
"uint152",
"uint160",
"uint168",
"uint176",
"uint184",
"uint192",
"uint200",
"uint208",
"uint216",
"uint224",
"uint232",
"uint240",
"uint248",
"uint256",
]

0 comments on commit d9fb841

Please sign in to comment.